[comp.sys.mac] Setting Laserwriter Linewidth

housen@ssc-vax.UUCP (Kevin Housen) (01/13/87)

You can easily set the line width used by the Laserwriter by using
PicComments....

All you need to do is make a call to PicComment (see IM) with kind=182,
dataSize=4 and a dataHandle which leads to a Quickdraw point.  The
vertical component of the point is the numerator and the horizontal
component is the denominator of a scaling factor that the current
pen size is multiplied by to obtain a new pen size.  For example,
if the point is (v=2,h=7) then the pen width and height are multiplied
by 2/7 to obtain the new pen size.  Apparently there was an error in
Tech Note #91, which claimed that the new pen size is given directly
by the components of the point.

This seems to work, although I found that I needed to preceede the
PicComment with at least one call to DrawString or LineTo (e.g. write
a space character with DrawString), otherwise nothing printed.  Argh.


                             Kevin Housen

                             Boeing Aerospace
                             MS 3H-29
                             Seattle,  WA  98124
                             (206)-657-3484