Functions


Animating Palettes

AnimateEntry Changes the color of a window’s palette entry.
AnimatePalette Changes the colors of a series of palette entries; it is similar to the AnimateEntry function, but it acts upon a range of entries.

Changing the Pixel Depth for a Video Device

HasDepth Determines whether a video device supports a specific pixel depth.
SetDepth Changes the pixel depth of a video device.

Determining Current Colors and Best Intermediate Colors

GetGray Determines the best intermediate color between two colors on a given graphics device.

Drawing With Color Palettes

PmBackColor Sets the background color field of the current graphics port to a palette color.
PmForeColor Sets the foreground color field of the current graphics port to a palette color.
RestoreBack Sets the current background color to the color you specify.
RestoreFore Sets the current foreground color to the color you supply.
SaveBack Saves the current background color.
SaveFore Saves the current foreground color.

Initializing and Allocating Palettes

DisposePalette Disposes of a palette.
GetNewPalette Creates and initializes a palette from a ‘pltt’ resource.
NewPalette Allocates a new palette from colors in the color table.

Initializing the Palette Manager

InitPalettes Initializes the Palette Manager.
PMgrVersion Determines which version of the Palette Manager is executing; it returns an integer specifying the version number.

Interacting With the Window Manager

ActivatePalette Changes the device color tables and generates window updates as needed to meet the color requirements of your window.
GetPalette Obtains a window’s palette.
GetPaletteUpdates Obtains the update attribute of a palette.
NSetPalette Associates a new palette with a window.
SetPalette Associates a palette with a window.
SetPaletteUpdates Sets the update attribute of a palette.

Manipulating Palette Entries

Entry2Index Obtains the index for a specified entry in the current graphics port’s palette on the current device.
GetEntryColor Obtains the color of a palette entry.
GetEntryUsage Obtains the usage and tolerance fields of a palette entry.
SetEntryColor Changes the color of a palette entry.
SetEntryUsage Modifies the usage category and tolerance values of a palette entry.

Manipulating Palettes and Color Tables

CTab2Palette Copies the colors of a color table into a palette.
CopyPalette Copies entries from one palette to another.
Palette2CTab Copies the colors of a palette into a color table.
ResizePalette Changes the size of a palette.
RestoreDeviceClut Sets the color table of a graphics device to its default state.

© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)