![]() |
ColorSpec |
Header: Quickdraw.h |
struct ColorSpec { SInt16 value; RGBColor rgb; }; typedef ColorSpec ColorSpecPtr;
The pixel value assigned by QuickDraw for the color specified in the rgb field of this structure. QuickDraw assigns a pixel value based on the capabilities of the users screen. For indexed devices, the pixel value is an index number assigned by QuickDraw 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.
An RGBColor structure that fully specifies the color whose approximation QuickDraw specifies in the value field.
When creating a PixMap structure for an indexed device, QuickDraw creates a ColorTable structure that defines the best colors available for the pixel image on that graphics device. QuickDraw also stores a ColorTable structure for the currently available colors in the graphics devices CLUT.
One of the fields in a ColorTable structure requires a value of type cSpecArray, which is defined as an array of ColorSpec structures. Typically, your application never needs to create ColorTable structures or ColorSpec structures. For completeness, the data structure of type ColorSpec is shown here.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)