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