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