Carbon


ColorTable

Header: Quickdraw.h

struct ColorTable {
    SInt32 ctSeed; 
    SInt16 ctFlags; 
    SInt16 ctSize; 
    CSpecArray ctTable;
};
typedef ColorTable CTabPtr;

Field descriptions

ctSeed

Identifies a particular instance of a color table. QuickDraw uses the ctSeed value to compare an indexed device’s color table with its associated inverse table (a table it uses for fast color lookup).When the color table for a graphics device has been changed, QuickDraw needs to rebuild the inverse table.

ctFlags

Flags that distinguish pixel map color tables from color tables in GDevice structures.

ctSize

One less than the number of entries in the table.

ctTable

An array of ColorSpec entries, each containing a pixel value and a color specified by an RGBColor structure.

When creating a PixMap structure for a particular graphics device, QuickDraw creates a ColorTable structure that defines the best colors available for the pixel image on that particular graphics device. QuickDraw also creates a ColorTable structure of all available colors for use by the CLUT on indexed devices.

Typically, your application needs to create ColorTable structures only if it uses the Palette Manager.

Your application should never need to directly change the fields of a ColorTable structure. If you find it absolutely necessary for your application to do so, immediately use the CTabChanged function to notify QuickDraw that your application has changed the ColorTable structure.


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