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: Imaging With QuickDraw /
Chapter 4 - Color QuickDraw / Color QuickDraw Reference
Data Structures /


ColorSpec

When creating a PixMap record (described on page 4-37) for an indexed device, Color QuickDraw creates a ColorTable record that defines the best colors available for the pixel image on that graphics device. The Color Manager also stores a ColorTable record for the currently available colors in the graphics device's CLUT.

One of the fields in a ColorTable record requires a value of type cSpecArray, which is defined as an array of ColorSpec records. Typically, your application never needs to create ColorTable records or ColorSpec records. For completeness, the data structure of type ColorSpec is shown here, and the data structure of type ColorTable is shown next.

TYPE
cSpecArray: ARRAY[0..0] Of ColorSpec;
ColorSpec = 
RECORD
   value:   Integer;    {index or other value}
   rgb:     RGBColor;   {true color}
END;
Field Description
value
The pixel value assigned by Color QuickDraw for the color specified in the rgb field of this record. Color QuickDraw assigns a pixel value based on the capabilities of the user's screen. For indexed devices, the pixel value is an index number assigned by the Color Manager to the closest color available on the indexed device; for direct devices, this value expresses the best available red, green, and blue values for the color on the direct device.
rgb
An RGBColor record (described in the previous section) that fully specifies the color whose approximation Color QuickDraw specifies in the value field.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996