Important: The information in this document is obsolete and should not be used for new development.
AnimatePalette
Changes the colors of a series of palette entries; similar to theAnimateEntry
function (page 1-20), but acts upon a range of entries.
pascal void AnimatePalette( WindowPtr dstWindow, CTabHandle srcCTab, short srcIndex, short dstEntry, short dstLength);
dstWindow
- A pointer to the window whose palette colors are to be changed.
srcCTab
- A handle to the color table containing the new colors. Color tables are described in the chapter "Color QuickDraw" of Inside Macintosh: Imaging With QuickDraw.
srcIndex
- The source color table entry at which copying starts.
dstEntry
- The palette entry at which copying starts.
dstLength
- The number of palette entries to be changed.
DISCUSSION
TheAnimatePalette
function changes the colors of a series of palette entries. Beginning at the index specified by thesrcIndex
parameter (which has a minimum value of 0), the number of entries specified indstLength
are copied from the source color table to the destination window's palette, beginning at the entry specified in thedstEntry
parameter. If the source color table specified insrcCTab
is not sufficiently large to accommodate the request,AnimatePalette
modifies as many entries as possible and leaves the remaining entries unchanged.SEE ALSO
For an example of using theAnimatePalette
function to achieve color animation effects, see Listing 1-5 (page 1-32) in Advanced Color Imaging on the Mac OS.