Important: The information in this document is obsolete and should not be used for new development.
Drawing With the Eight-Color System
On a color screen, you can draw using eight predefined colors, even when you are using a basic graphics port. Although basic QuickDraw graphics routines were designed for black-and-white drawing, they also include rudimentary color capabilities. Because Color QuickDraw also supports this system, it is compatible across all Macintosh platforms. (This section describes the rudimentary color routines included in basic QuickDraw. See the next chapter, "Color QuickDraw," for information about more sophisticated color use in your application.)A pair of fields in a
GrafPort
record,fgColor
andbkColor
, specify a foreground and background color. The foreground color is the color of the "ink" used to frame, fill, and paint. By default, the foreground color is black. The background color is the color of the pixels in the bitmap wherever no drawing has taken place. By default, the background color is white. However, you can use theForeColor
andBackColor
procedures to change these fields. When printing, however, use theColorBit
procedure to set the foreground color.In System 7, these Color QuickDraw routines are available to basic QuickDraw:
RGBForeColor
,RGBBackColor
,GetForeColor
, andGetBackColor
. Described in the next chapter, "Color QuickDraw," these routines can also assist you in manipulating the eight-color system of basic QuickDraw.
Subtopics
- ForeColor
- BackColor
- ColorBit