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 / Animating Palettes


AnimatePalette

Changes the colors of a series of palette entries; similar to the AnimateEntry 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
The AnimatePalette function changes the colors of a series of palette entries. Beginning at the index specified by the srcIndex parameter (which has a minimum value of 0), the number of entries specified in dstLength are copied from the source color table to the destination window's palette, beginning at the entry specified in the dstEntry parameter. If the source color table specified in srcCTab 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 the AnimatePalette function to achieve color animation effects, see Listing 1-5 (page 1-32) in Advanced Color Imaging on the Mac OS.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996