Carbon


ForeColor

Header: Quickdraw.h Carbon status: Supported

Changes the color of the “ink” used for framing, painting, and filling on computers that support only basic QuickDraw.

void ForeColor (
    SInt32 color
);
Parameter descriptions
color

One of eight color values. See “Color Constants”

DISCUSSION

By default, the foreground color of a GrafPort is black.

The ForeColor function sets the foreground color for the current graphics port to the color that you specify in the color parameter. When you draw with the patCopy and srcCopy transfer modes, for example, black pixels are drawn in the color you specify with ForeColor.

When printing, use the ColorBit function to set the foreground color.

All nonwhite colors appear as black on black-and-white screens. Before you use ForeColor, use the DeviceLoop function to determine the color characteristics of the current screen.

SPECIAL CONSIDERATIONS

The ForeColor function may move or purge memory blocks in the application heap; do not call this function at interrupt time.

VERSION NOTES

In System 7, you may instead use the color QuickDraw function RGBForeColor.

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)