Important: The information in this document is obsolete and should not be used for new development.
RGBBackColor
For the current graphics port, you can use theRGBBackColorprocedure to change the background color (that is, the color of the pixels in the pixel map or bitmap where no drawing has taken place).
PROCEDURE RGBBackColor (color: RGBColor);
color- An
RGBColorrecord.DESCRIPTION
TheRGBBackColorprocedure lets you set the background color to any color available on the current graphics device.If the current port is defined by a
CGrafPortrecord, Color QuickDraw supplies itsrgbBkColorfield with the RGB value that you specify in thecolorparameter, and places the pixel value most closely matching that color in thebkColorfield. For
indexed devices, the pixel value is an index to the current device's CLUT; for direct devices, the value is the 16-bit or 32-bit equivalent to the RGB value.If the current port is defined by a
GrafPortrecord, basic QuickDraw supplies itsfgColorfield 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 thecolorparameter. Basic QuickDraw uses that 3-bit number to select a color from its eight-color system. Table 4-4 on page 4-62 lists the default colors.SPECIAL CONSIDERATIONS
Because a pixel pattern already contains color, Color QuickDraw ignores the background color (and the foreground color) when your application draws with a pixel pattern. You can draw with a pixel pattern by using thePenPixPatprocedure to assign a pixel pattern to the foreground pattern used by the graphics pen; by using theBackPixPatprocedure to assign a pixel pattern as the background pattern for the current color graphics port; and by using theFillCRect,FillCOval,FillCRoundRect,FillCArc,FillCRgn, andFillCPolyprocedures to fill shapes with a pixel pattern.This procedure is available for basic QuickDraw only in System 7.
The
RGBBackColorprocedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.SEE ALSO
If you want to use one of the eight predefined colors of basic QuickDraw, you can also use theBackColorprocedure. TheBackColorprocedure and the eight-color system of basic QuickDraw are described in the chapter "QuickDraw Drawing" in this book.To determine the current background color, use the
GetBackColorprocedure, which is described on page 4-71.