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


AnimateEntry

Changes the color of a window's palette entry.

pascal void AnimateEntry(
WindowPtr dstWindow, 
short dstEntry,
                        const RGBColor *srcRGB); 
dstWindow
A pointer to the window whose palette color is to be changed.
dstEntry
The palette entry to be changed.
srcRGB
A pointer to an RGB color structure specifying the new RGB value.
DISCUSSION
The AnimateEntry function changes the RGB value of an animated entry for a window's palette. Each device for which that index has been reserved is immediately modified to contain the new value. This is not considered to be a change to the device's color environment because no other windows should be using the animated entry.

If the palette entry is not an animated color or if the associated indexes are no longer reserved, no animation occurs.

If you have blocked color updates in a window by using SetPalette with cUpdates set to FALSE, you may observe unintentional animation. This occurs when ActivatePalette reserves for animation device indexes that are already used in the window. Redrawing the window, which normally is the result of a color update event, removes any animated colors that do not belong to the window.

SEE ALSO
For an example of using the AnimateEntry 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