[comp.sys.mac.programmer] FAQ about line weight to printer?

des@adi.com (Dave Steinhoff) (04/12/91)

I apologize if this is a FAQ, but is there some way I can control the
line weight when I print Mac window contents to a LaserWriter?  I need
to print very complex electrical drawings, but the output is too dense.

Please respond either directly to me or to this group.
Thanks,
Dave
--
-------------------------------------------------------------------
Dave Steinhoff                              Applied Dynamics, Int'l
des@amara.UUCP                              3800 Stone School Rd.
des@adi.com                                 Ann Arbor, Mi 48108
...uunet!amara!des                          (313)973-1300                 
-------------------------------------------------------------------

casseres@apple.com (David Casseres) (04/16/91)

In article <DES.91Apr12091755@salmon.adi.com> des@adi.com (Dave Steinhoff) 
writes:
> ...is there some way I can control the
> line weight when I print Mac window contents to a LaserWriter?  I need
> to print very complex electrical drawings, but the output is too dense.

The best thing to do is draw the picture at printer resolution instead of 
the 72 x 72 dpi screen resolution.  Use a PrGeneral call (see Inside 
Macintosh Vol. V) to find out what resolutions the printer supports, and 
another one to set the imaging resolution you are going to use.  In the 
case of a (Postscript) LaserWriter, you will see a wide range of 
acceptable resolutions; use 300 for simplicity -- or if you think the 
picture might someday be printed on a 1200 dpi printer, specify that, or 
some larger number; Postscript and the LaserWriter driver will take care 
of you.

For other printers you will see a set of resolution values; pick the one 
you like (presumably the highest).  It's good practice to make your code 
printer-independent, so you should allow for these cases; who knows, you 
might need to print a draft on an ImageWriter some day.

Having set the imaging resolution, just scale each object that you draw by 
the ratio of that resolution to 72 x 72.

David Casseres
     Exclaimer:  Hey!

marshall@sdd.hp.com (Marshall Clow) (04/16/91)

In article <DES.91Apr12091755@salmon.adi.com> des@adi.com (Dave Steinhoff) writes:
>I apologize if this is a FAQ, but is there some way I can control the
>line weight when I print Mac window contents to a LaserWriter?  I need
>to print very complex electrical drawings, but the output is too dense.
>

I'm assuming that you are talking about printing lines less than one pixel
wide on the screen. There are two ways that you can do this:

1) Work at the printer's resolution instead of the screen resoultion.
See IM-V, pg 413 for a discussion of PrGeneral and GetReslData and SetResl.
This will allow you to place all your objects exactly where you want on
the page. Disadvantage is that you have to scale your drawing yourself.

2) Use the picSetLineWidth picture comment. This is described vaguely in
Tech Note #91, and then much more completely in TN #175. This will allow
you to "thin" all the lines in your drawing by some factor. Disadvantage
is that it only thins lines and frames.

Hope this helps,

Marshall Clow
Hewlett Packard Color Imaging
Internet:  marshall@sdd.hp.com
AppleLink: HP.Marshall