Path: utzoo!attcan!uunet!husc6!bloom-beacon!bu-cs!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac.programmer Subject: Re: DESPERATE!! Need help with GDevices Keywords: GDevice, offscreen Message-ID: <14163@dartvax.Dartmouth.EDU> Date: 1 Jul 89 18:30:11 GMT References: <1385@garcon.cso.uiuc.edu> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Organization: Thayer School of Engineering Lines: 32 In article <1385@garcon.cso.uiuc.edu> emb90619@uxa.cso.uiuc.edu (Eric M Berdahl) writes: >HELP! I am doing imaging for a printer which uses 256 >grayscale. Thus, I need to create and maintain a GDevice >with such a color tableUnless you can get around the >restriction in CopyBits of having the destination PixMap >have the same color table as the gDevice) _Any_ experience >you have will be appreciated. > >Specifically, I need to know what exactly needs to be initialized >by me and any special values I need to use for particular >fields. Apple has released a series of "Sample Code" programs which would be useful in answering questions like this. These come in packages which generally include the complete source code and a working application illustrating some programming problem and how to solve it. The Sample Code programs have a numbering scheme similar to that used for TechNotes, and the code for "SCN.008.FracAppPalette" appears to be a good place to start. This has an apparently complete example of how to create and maintain a GDevice for an offscreen PixMap. There are 18 of these packages at present, and the code quality appears to be quite good in those I have looked at. If you have Internet access, copies of Sample Code are located in sumex-aim.stanford.edu:/info-mac/apple/code. They are also available through AppleLink, and can be ordered from APDA. Earle R. Horton "People forget how fast you did a job, but they remember how well you did it." Salada Tag Lines