[comp.sys.mac.programmer] DESPERATE!! Need help with GDevices

emb90619@uxa.cso.uiuc.edu (Eric M Berdahl) (06/29/89)

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.

Thanx in advance.

Eric M. Berdahl
Amoco Technology Company
Amoco Research Center  PO Box 3011  MC F-2
Naperville, IL  60566   312-420-3820
(temporarily) emb90619@uxa.cso.uiuc.edu
Eric M. Berdahl
PsiWare Software not inc.
emb90619@uxa.cso.uiuc.edu

earleh@eleazar.dartmouth.edu (Earle R. Horton) (07/02/89)

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