Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 1 - Palette Manager Reference /
Palette Manager Functions / Manipulating Palettes and Color Tables


CopyPalette

Copies entries from one palette to another.

pascal void CopyPalette(
PaletteHandle srcPalette,
                        PaletteHandle dstPalette,
                        short srcEntry,
                        short dstEntry,
                        short dstLength);
srcPalette
A handle to the palette from which colors are copied.
dstPalette
A handle to the palette to which colors are copied.
srcEntry
The source palette entry at which copying starts.
dstEntry
The destination palette entry at which copying starts.
dstLength
The number of destination palette entries to change.
DISCUSSION
The CopyPalette function copies entries from the source palette into the destination palette. The copy operation begins at the values specified by the srcEntry and dstEntry parameters, copying into as many entries as are specified by the dstLength parameter. CopyPalette resizes the destination palette when the number of entries after the copy operation is greater than it was before the copy operation.

CopyPalette does not call ActivatePalette, so your application is free to change the palette a number of times without causing a series of intermediate changes to the color environment. Your application should call ActivatePalette after completing all palette changes.

If either of the palette handles is nil, CopyPalette does nothing.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996