home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 12874 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  2.0 KB

  1. Path: sparky!uunet!gatech!pitt.edu!usenet.cis.pitt.edu!andre
  2. From: andre@flash.cs.pitt.edu (Andre "A Mac Plumber" Srinivasan)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: q: mask/mask region for color object animation
  5. Message-ID: <ANDRE.92Jul22172747@flash.cs.pitt.edu>
  6. Date: 22 Jul 92 21:27:47 GMT
  7. Sender: news+@pitt.edu
  8. Distribution: na
  9. Organization: Acme Plumbing Services And Exploding Cigars
  10. Lines: 38
  11.  
  12.  
  13. i am trying to drag a picture around the screen ala DragGrayRgn, but i
  14. want the color pict dragged, not just an outline.
  15.  
  16. at first i was just drawing the pict to the offscreen gworld, but
  17. since the object is not a perfect rectangle (it's an arrow), parts of
  18. the background get erased by the pict rectangle.  no problem, i
  19. thought, i'll create a pixmap of the pict, copy the pixmap to a bitmap
  20. (no port allocated, i just created a bitmap based on tn#120) and
  21. create a maskrgn with BitMapToRegion which i'll use in conjuction with
  22. copybits.
  23.  
  24. but this wasn't working - i'm ending up with an outline of my arrow
  25. (which has a black outline and a solid color interior).  i checked the
  26. bitmap by copying it to my on screen port and found that i indeed had
  27. an outline rather than a solid black arrow.
  28.  
  29. i also tried eliminating the maskrgn by using copymask with the bitmap
  30. as a mask, but i just ended up with the same thing.
  31.  
  32. i tried creating a searchproc that changed non white into black, but
  33. this didn't work.  i tried returning all kinds of other values to try
  34. to get something other than an outline, but i always did.  at this
  35. point i have to believe (until told otherwise) that copybits does not
  36. call the search proc if the destination is a bitmap.
  37.  
  38. so how do i create either a mask to use with copymask or a mask region
  39. to use with copybits so when i copybits my pixmap to my gworld, only
  40. the non white pixels get copied and i end up with a color object?
  41.  
  42. thanks.
  43.  
  44.                                 -andre.
  45. --
  46. Andre Srinivasan  : 
  47. 734 LRDC          : "Well scratch my back with a hacksaw."
  48. U. of Pittsburgh  :                    - Mike Lange
  49. andre@cs.pitt.edu :
  50.