[ont.micro.mac] bug in quickdraw

info-mac@utcsrgv.UUCP (info-mac) (07/06/84)

Date: Thu 5 Jul 84 13:20:31-EDT
From: Martin J Mahoney <uw-beaver!UI.MJM%CU20B@COLUMBIA-20.ARPA>
Subject: bug in quickdraw
To: info-mac@SUMEX-AIM.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@utcsrgv.UUCP (info-mac) (07/06/84)

Date: 5 Jul 84 14:35 EDT
From: Richard Reich <uw-beaver!REICH@NYU-ACF1.ARPA>
To: UI.MJM%CU20B@COLUMBIA-20.ARPA
Subject: RE: bug in quickdraw
Cc: INFO-MAC@SUMEX-AIM.ARPA
In-Reply-To: <8407051741.AA05277@NYU.ARPA> 	;
	Message of 5-JUL-1984 13:44 from Martin J Mahoney <UI.MJM%CU20B@COLUMBIA-20.ARP
	A>

Sorry folks.
That's bEhavior and hanging to the RIGHT and bewlow. BELOW UGH!!
-r

-------

info-mac@utcsrgv.UUCP (info-mac) (07/06/84)

Date: 5 Jul 84 14:32 EDT
From: Richard Reich <uw-beaver!REICH@NYU-ACF1.ARPA>
To: UI.MJM%CU20B@COLUMBIA-20.ARPA
Subject: RE: bug in quickdraw
Cc: INFO-MAC@SUMEX-AIM.ARPA
In-Reply-To: <8407051741.AA05277@NYU.ARPA> 	;
	Message of 5-JUL-1984 13:44 from Martin J Mahoney <UI.MJM%CU20B@COLUMBIA-20.ARP
	A>

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

-------