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

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!vipunen.hut.fi!jmunkki
  3. From: jmunkki@vipunen.hut.fi (Juri Munkki)
  4. Subject: Re: How to get color I want when drawing directly to screen
  5. Message-ID: <1993Jan8.222719.17054@nntp.hut.fi>
  6. Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
  7. Nntp-Posting-Host: vipunen.hut.fi
  8. Reply-To: jmunkki@vipunen.hut.fi (Juri Munkki)
  9. Organization: Helsinki University of Technology
  10. References: <1993Jan8.145036.21943@rtsg.mot.com>
  11. Date: Fri, 8 Jan 1993 22:27:19 GMT
  12. Lines: 21
  13.  
  14. In article <1993Jan8.145036.21943@rtsg.mot.com> wolfmc@rtsg.mot.com (Michael Wolf) writes:
  15. >So...the $60 questions is:  What isthe best/fastest way to get the colors I
  16. >had intended with the image when I am doing direct writing to device video
  17. >memory.
  18.  
  19. Assuming that you have some sort of sprites in an offscreen pixel map, make
  20. that offscreen pixel map use the same gDevice as your screen. This way, the
  21. color tables are the same.
  22.  
  23. Of course, if you have multiple screens and you want to support them, you
  24. have to do this for every screen.
  25.  
  26. If you are drawing geometrical shapes (polygons and lines), you can convert
  27. colors to pixel values with Color2Index. You only need to do this when the
  28. ctSeed of the color map changes.
  29.  
  30. When do I get my $60?
  31.  
  32. -- 
  33.   Juri Munkki                           Windsurf: fast sailing
  34.  jmunkki@hut.fi                          Macintosh: fast software
  35.