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: Advanced Color Imaging Reference /
Chapter 2 - Color Picker Manager Reference /
Color Picker Manager Functions / Using the Standard Color Picker Dialog Box


GetColor

Displays a standard color picker dialog box. However, your application should use the PickColor function, which is described in the preceding section, instead of this function. The GetColor function was designed for use for version 1.0 of the Color Picker Package and is still supported for backward compatibility.

pascal Boolean GetColor (
Point where, 
Str255 prompt, 
RGBColor *inColor, 
RGBColor *outColor);
where
A point defining the location of the upper-left corner of the dialog box. If you set this parameter to (0,0), the dialog box is centered horizontally on the main screen, with one-third of the empty space above the box and two-thirds below, regardless of the screen size. If you set this parameter to (-1,-1), the GetColor function displays the dialog box on the screen supporting the greatest pixel depth.
prompt
Text for prompting the user to choose a color. This string is displayed in the upper-left corner of the dialog box.
inColor
A pointer to a Color QuickDraw RGBColor structure describing the original color, which the user may want for comparison.
outColor
A pointer to a Color QuickDraw RGBColor structure describing the new color. This is set to the last color that the user picked before clicking OK. On entry, the outColor parameter is treated as undefined, so the output color sample initially matches the input. Although the color being picked may vary widely, the input color sample remains fixed, and clicking the input sample resets the output color sample to match it.
DISCUSSION
The GetColor function displays a standard color picker dialog box onscreen. The GetColor function returns true and removes the dialog box when the user clicks the OK button; GetColor returns false and removes the dialog box when the user clicks the Cancel button.

SPECIAL CONSIDERATIONS
The GetColor function does not support ColorSync 1.0 color matching; however, the PickColor function does.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996