Carbon


BackColor

Header: Quickdraw.h Carbon status: Supported

Changes a basic graphics port’s background color.

void BackColor (
    SInt32 color
);
Parameter descriptions
color

One of eight color values. See “Color Constants”.

DISCUSSION

The background color is the color of the pixels in the bitmap wherever no drawing has taken place. By default the background color of a GrafPort is white.

The BackColor function sets the background 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, white pixels are drawn in the color you specify with BackColor.

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

SPECIAL CONSIDERATIONS

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

VERSION NOTES

In System 7, use the Color QuickDraw function RGBBackColor.

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)