[fa.info-mac] bug in quickdraw

info-mac@uw-beaver (info-mac) (07/05/84)

From: Martin J Mahoney <UI.MJM%CU20B@COLUMBIA-20.ARPA>


While using the Mac yesterday i discovered a bug in Quickdraw. 
I tried to draw two rectangles such that they shared a common side,
however, one was drawn using the FRAMERECT quickdraw routine and the
other used the LINETO quickdraw routines.  When the two rectangles
were drawn the one draw using the LINETO calls had its vertical sides
slightly longer than the one drawn with the FRAMERECT call, when the
sides should have all been the same length.

Here is the code to reproduce the problem in both MS-basic and Forth:

	MS-BASIC

10 dim rect%(3)
20 rect%(0)=50:rect%(1)=50:rect%(2)=100:rect%(3)=100
30 call FRAMERECT(varptr(rect%(0)))
40 call moveto(0,50):call lineto(0,100)
50 call lineto(50,100):call lineto(50,50):call lineto(0,50)
60 end


	FORTH

gint
50 50 100 100 frame rectangle
0 50 0 100 vector
0 100 50 100 vector
50 100 50 50 vector
50 50 0 50 vector



Martin J. Mahoney
-------

info-mac@uw-beaver (info-mac) (07/05/84)

From: Richard Reich <REICH@NYU-ACF1.ARPA>
Sorry folks.
That's bEhavior and hanging to the RIGHT and bewlow. BELOW UGH!!
-r

-------

info-mac@uw-beaver (info-mac) (07/05/84)

From: Richard Reich <REICH@NYU-ACF1.ARPA>
The bahavior you describe is completely in accord with QD documentation
and philosophy -- FrameRect draws "just inside" the argument rect.
Remember that QD coords are at the interstices between pixels, not at
the pixels themselves.  Lines are drawn with the pen "hanging" to the
left and BELOW the specified coords.  No bug.
-r

-------