Important: The information in this document is obsolete and should not be used for new development.
MySearchProc
Application-defined function that examines theRGBColor
data structure passed by the Color Manager and returns the index to the best-mapping color in the currentGDevice
data structure.By creating a custom search function, your application can override the Color Manager's code for inverse table mapping.
pascal Boolean MySearchProc ( RGBColor *rgb, long *position);
rgb
- A pointer to a color value data structure.
position
- A pointer to a color index value. On output, the index of the best-mapping color your function finds.
DISCUSSION
The Color Manager specifies the desired color in theRGBColor
field of aColorSpec
data structure and passes it by a pointer on the stack. Your function should return the corresponding index in theColorSpec.value
field. If your function can't handle the search, returnfalse
as the function value, and pass theRGBColor
data structure back to the Color Manager in thergb
parameter.The Color Manager calls each search function in the list until one returns the Boolean value
true
. If no search function installed in the linked list returnstrue
, the Color Manager calls the default search function.