![]() |
RGBBackColor |
||||
Header: | Quickdraw.h | Carbon status: | Supported | |
Changes the background color.
void RGBBackColor ( const RGBColor *color );
An RGBColor structure.
If the current port is defined by a CGrafPort structure, QuickDraw supplies its rgbBkColor field with the RGB value that you specify in the color parameter, and places the pixel value most closely matching that color in the bkColor field. For indexed devices, the pixel value is an index to the current devices CLUT. F or direct devices, the value is the 16-bit or 32-bit equivalent to the RGB value.
If the current port is defined by a GrafPort structure, basic QuickDraw supplies its fgColor field with a color value determined by taking the high bit of each of the red, green, and blue components of the color that you supply in the color parameter. Basic QuickDraw uses that 3-bit number to select a color from its eight-color system.
You can also use Palette Manager functions to set the background color.
To determine the current background color, use the GetBackColor function.
Because a pixel pattern already contains color, QuickDraw ignores the background color and foreground colors when your application draws with a pixel pattern. Use the PenPixPat function to assign a pixel pattern to the foreground pattern used by the graphics pen. Use the BackPixPat function to assign a pixel pattern as the background pattern for the current color graphics port. Use the FillCRect, FillCOval, FillCRoundRect, FillCArc, FillCRgn, and FillCPoly functions to fill shapes with a pixel pattern.
The RGBBackColor function may move or purge memory blocks in the application heap; do not call this function at interrupt time.
This function is available for basic QuickDraw only in System 7. To set the background color for basic graphics ports on older versions of system software, use the BackColor function.
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)