Important: The information in this document is obsolete and should not be used for new development.
Drawing With Color QuickDraw Colors
You can set the foreground and background colors using either Color QuickDraw or Palette Manager routines. If your application uses the Palette Manager, it should set the foreground and background colors with thePmForeColor
andPmBackColor
routines, as described in the chapter "Palette Manager" in Inside Macintosh: Advanced Color Imaging. Otherwise, it can use theRGBForeColor
procedure to set the foreground color, and it can use theRGBBackColor
procedure to set the background color. Both of these Color QuickDraw procedures also operate for basic graphics ports created in System 7. (To set the foreground and background colors for basic graphics ports on older versions of system software, use theForeColor
andBackColor
procedures, described in the chapter "QuickDraw Drawing" in this book.)To give the graphics pen a pixel pattern so that it draws with a colored, patterned "ink," use the
PenPixPat
procedure. To assign a pixel pattern as the background pattern, you can use theBackPixPat
procedure; this allows theScrollRect
procedure and the shape-erasing procedures (for example,EraseRect
) to fill the background with the pixel pattern.To set the color of an individual pixel, use the
SetCPixel
procedure.The
FillCRect
,FillCRoundRect
,FillCOval
,FillCArc
,FillCPoly
, andFillCRgn
procedures allow you to fill shapes with multicolored patterns.To change the highlight color for the current color graphics port, use the
HiliteColor
procedure. To set values used by arithmetic transfer modes, use theOpColor
procedure.As described in "Copying Pixels Between Color Graphics Ports" beginning on page 4-22, you can also use the basic QuickDraw procedures
CopyBits
,CopyMask
, andCopyDeepMask
to transfer images between color graphics ports. See the chapter "QuickDraw Drawing" in this book for complete descriptions of these procedures.
Subtopics
- RGBForeColor
- RGBBackColor
- SetCPixel
- FillCRect
- FillCRoundRect
- FillCOval
- FillCArc
- FillCPoly
- FillCRgn
- OpColor
- HiliteColor