[comp.sys.mac.misc] SetLineWidth: DeskWriter vs LaserWriter

vbob@umd5.umd.edu (Bob Shields) (06/06/90)

The following is a code fragment I have used to test "SetLineWidth"
PicComments on both my HP Deskwriter at home and a LaserWriter at work.
It seems to produce different results based on which printer I use.
In both cases, the first two lines are drawn "correctly" (at 1 point
and .25 point thinkness, respectively).  However, on the LaserWriter,
the last line drawn is at 1 point thickness, which is how I believe
things are supposed to work.  But on the Deskwriter, the last line
is drawn at 4 points thickness.  Am I interpreting the way SetLineWidth
works incorrectly, or is there a problem in one of the printer drivers?
(I am using Rev A.01.00 of the DeskWriter driver).

	Point	**hPt;
	
	TextFont(applFont);
	MoveTo(20, 20);
	DrawString("\pThis is a test.");
	
	MoveTo(20, 40);
	LineTo(120, 40);
	MoveTo(20, 60);
	DrawString("\pThe above line should be 1 point in width.");
	
	hPt = (Point **) NewHandle(sizeof(Point));
	(**hPt).h = 4;
	(**hPt).v = 1;
	PicComment(SetLineWidth, sizeof(Point), hPt);
	MoveTo(20, 100);
	LineTo(120, 100);
	MoveTo(20, 120);
	DrawString("\pThe above line should be .25 point in width.");
	
	(**hPt).h = 1;
	(**hPt).v = 4;			/* should it be '1' or '4' ? */
	PicComment(SetLineWidth, sizeof(Point), hPt);
	MoveTo(20, 160);
	LineTo(120, 160);
	MoveTo(20, 180);
	DrawString("\pThe above line should be 1 point in width.");
-- 
----------- 
Bob Shields		 vbob@umd5.umd.edu 

jeffe@eniac.seas.upenn.edu (George J. Jefferson) (06/06/90)

It seems to me that the Deskwriter usually prints quickdraw lines 
quite a bit *thinner* than the Laserwriter.  For example the fraction
bars in MSWord, anything from MacDrawII, etc.  

Is this contrary to the previous posting?  I am assuming that these
applications use the same Setlinewidth convention.
George Jefferson    jeffe@eniac.seas.upenn.edu   george@sol1.lrsm.upenn.edu

stevem@hpvcfs1.HP.COM (Steve Miller) (06/16/90)

	
>  (**hPt).h = 1;
>  (**hPt).v = 4;			/* should it be '1' or '4' ? */
>  PicComment(SetLineWidth, sizeof(Point), hPt);
>  MoveTo(20, 160);
>  LineTo(120, 160);
>  MoveTo(20, 180);
>  DrawString("\pThe above line should be 1 point in width.");

I believe that this should produce a 4 point line.  I should because I 
implemented this picComment for the DeskWriter driver.  Let's look at
Mac Tech Note #175 and see what Apple says:

"Before we look at what the SetLineWidth comment does, let's look at the
argument passed to the comment.  The argument is represented as a QuickDraw
Point, however it is interpreted by the LaserWriter as a fraction.
The LaserWriter interprets a point(h,v) to be a real number whose value
is (v/h).  This means that a point whose value is h=2, h=1, will be converted
to 0.5 before being used by the LaserWriter.  If you wanted to pass a value
of 0.25, you would pass a point whose value is h=4, v=1.  For 1.25, pass a
point, h=4, v=5."

It's clear to me that the thickness of the line, in points, is simply the
ratio of v/h.  I don't know why, in your case, the LaserWriter prints the
result with a 1 point thick line.  But from the calculation, the line in
your example should be 4 points thick:  4 pts = 4/72 = about 17 pixels thick at
300 dots per inch.

Steven Miller
Vancouver Division
Hewlett Packard

stevem@hpvcfs1.HP.COM (Steve Miller) (06/16/90)

>It seems to me that the Deskwriter usually prints quickdraw lines 
>quite a bit *thinner* than the Laserwriter.  For example the fraction
>bars in MSWord, anything from MacDrawII, etc.  
>
>Is this contrary to the previous posting?  I am assuming that these
>applications use the same Setlinewidth convention.
>George Jefferson    jeffe@eniac.seas.upenn.edu   george@sol1.lrsm.upenn.edu

The DeskWriter's lines are a bit thinner because it's spot size is higher
resolution (smaller) than the LaserWriter II's.  In fact the LaserWriter II
has a thicker line width than the old LaserWriter Plus due to the different
Cannon engine they used.  Cannon made the change to the engine to make
solid blacks darker at the expense of being able to print very thin lines.

Steven Miller
Vancouver Division
Hewlett Packard

psrccrc@prism.gatech.EDU (Richard Catrambone) (07/01/90)

Can anyone tell me where I can get relatively good
and recent freeware or shareware virus protection
and removal programs (via ftp) for the Macintosh?
-- 
Richard Catrambone
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp:     ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!psrccrc
Internet: psrccrc@prism.gatech.edu