home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 20772 < prev    next >
Encoding:
Text File  |  1993-01-06  |  1.4 KB  |  35 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!psinntp!panix!rmah
  3. From: rmah@panix.com (Robert Mah)
  4. Subject: Re: QuickDraw: Why Can't it Mirror Right?
  5. Message-ID: <C0F8rz.8Iw@panix.com>
  6. Organization: PANIX Public Access Unix, NYC
  7. References: <1993Jan5.191918.12324@fsl.noaa.gov>
  8. Date: Wed, 6 Jan 1993 07:28:46 GMT
  9. Lines: 24
  10.  
  11. In <1993Jan5.191918.12324@fsl.noaa.gov> urban@yoda.fsl.noaa.gov (Art Urban) writes:
  12.  
  13. >If I draw a line from 0,0 down and to the left, why won't QuickDraw mirror
  14. >the line when I draw it down and to the *right*?
  15.  
  16. The reason is that the coordinates you are passing to QuickDraw routines are
  17. NOT pixel locations.  They are the locations BETWEEN pixels.  
  18.  
  19. Thus, if you draw a line from (0,0) to (4,0), with a pensize of (1,1), it 
  20. will be 5 pixels long.  But if you draw (0,0) to (-4,0) with a pensize of 
  21. (1,1), the line will be still be 5 pixels long, but have a RIGHT location
  22. at coordinate 1.  The key is that the "pen" hangs down and to the right of
  23. the "pen location".  And LINE drawing takes place using the pen.
  24.  
  25. You should re-read the beginning of the Quickdraw chapter in IM-I for a 
  26. much clearer description of the graphics model used within QD.
  27.  
  28. Good luck,
  29. Rob
  30. -- 
  31. [--------------------------------------------------]
  32. [  Robert S. Mah   |  "Every day an adventure,     ]
  33. [  rmah@panix.com  |   every moment a challenge."  ]
  34. [--------------------------------------------------]
  35.