home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!cs.utexas.edu!swrinde!gatech!destroyer!gumby!kzoo!k044477
- From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
- Subject: Re: QuickDraw: Why Can't it Mirror Right?
- Message-ID: <1993Jan5.223122.28197@hobbes.kzoo.edu>
- Organization: Kalamazoo College
- References: <1993Jan5.191918.12324@fsl.noaa.gov>
- Date: Tue, 5 Jan 1993 22:31:22 GMT
- Lines: 39
-
- urban@yoda.fsl.noaa.gov (Art Urban) writes:
- >There is something wrong with either QuickDraw or me... :-)
- >
- >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*?
-
- 'coz it doesn't use a very good algorithm. QD always draws lines from
- top to bottom, but instead of splitting the horizontal error equally
- along the line, it biases it. Are you getting a bias toward the top
- when you draw left and a bias toward the bottom when you draw right?
- (Just a guess.)
-
- >No matter
- >what I do, I cannot coerce QuickDraw to create a mirrored (pixel for pixel)
- >line angle.
-
- Nope. You can't. Even if you could, I heard someone making noises
- about 7.1 drawing lines differently than all previous systems. If true,
- you probably don't want to use lines to make regions where every pixel
- is important.
-
- >I need this for a bisymetrical region I'm making, so I can't
- >just flip around some CopyBits operation (I presume).
-
- Well, when I needed a small hexagon region a few weeks ago, I ended up
- framing all the individual rectangles, top to bottom. It's not pretty,
- but I only had to make it once, and the resulting region is exactly the
- same as if I did it with LineTo()s. Except that it'll still be the same
- even when System 12 is released and LineTo(), instead of drawing
- straight lines, uses cubic splines which for technical reasons will only
- be able to _approximate_ straightness...
-
- If your region is too big to fabricate with rectangles, I don't know
- what to tell you. Anyone have any bright ideas?
- --
- Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy
- "Estimated number of DOS viruses in existence today: 1,500
- Number of Macintosh-based viruses: Less than 40
- New DOS viruses discovered in summer '92: More than 100" - ComputerWorld
-