Important: The information in this document is obsolete and should not be used for new development.
Color2Index
Used by system software to obtain the index of the best available approximation for a given color in the color table of the currentGDevice
data structure.
pascal long Color2Index (const RGBColor *myColor);
- myColor
- A pointer to the RGB color value to be approximated.
DISCUSSION
TheColor2Index
function returns the index of the best approximation for a given color that is available in the color table of the currentGDevice
data structure. Note thatColor2Index
returns a long integer, in which the low-order word is the index value; the high-order word contains zeros.You should not call
Color2Index
from within a custom search function such as MySearchProc (page 5-17).