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

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