home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15318 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.3 KB  |  29 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!caen!batcomputer!cornell!csuley
  3. From: csuley@cs.cornell.edu (Christopher Suley)
  4. Subject: CopyBits question
  5. Message-ID: <1992Sep11.001409.13276@cs.cornell.edu>
  6. Organization: Cornell Univ. CS Dept, Ithaca NY 14853
  7. Date: Fri, 11 Sep 1992 00:14:09 GMT
  8. Lines: 19
  9.  
  10. I have a color image residing in an offscreen pixmap that I want to
  11. CopyBits to the screen.  Not too hard, but there's a catch.  I want
  12. all of the white pixels in the offscreen image to become a certain
  13. color when they appear on the screen.
  14.  
  15. Using transparent mode doesn't work, because it leaves what was on
  16. the screen beforehand in place, and that isn't what I want.  I
  17. suppose I could just do a FillRect with the color I want, and then
  18. a CopyBits in transparent mode, but I was hoping to be able to do
  19. everything in one step.  (it's an animated image, so filling the
  20. rectangle then copying would introduce some flickering as the area
  21. was cleared, then redrawn each time)
  22.  
  23. Setting the background color to the color I want would work, but it
  24. would colorize the rest of the image. (right?  I am programming on
  25. an SE, so this color stuff is mostly a mental experiment until I
  26. run up the massive hill to school and test it on a color computer
  27. there... talk about an expensive code/compile/run cycle. ;)
  28.  
  29.