Carbon


GetForeColor

Header: Quickdraw.h Carbon status: Supported

Obtains the color of the foreground color for the current graphics port.

void GetForeColor (
    RGBColor *color
);
Parameter descriptions
color

On return, the RGBColor structure for the current foreground color.

DISCUSSION

This function operates for graphics ports defined by both the GrafPort and CGrafPort structures. If the current graphics port is defined by a CGrafPort structure, the returned value is taken directly from the rgbFgColor field.

If the current graphics port is defined by a GrafPort structure, then only eight possible RGB values can be returned. These eight values are determined by the values in a global variable named QDColors, which is a handle to a color table containing the current QuickDraw colors.

Use the RGBForeColor function to change the foreground color.

VERSION NOTES

This function is available for basic QuickDraw only in System 7.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)