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 thePmForeColorandPmBackColorroutines, as described in the chapter "Palette Manager" in Inside Macintosh: Advanced Color Imaging. Otherwise, it can use theRGBForeColorprocedure to set the foreground color, and it can use theRGBBackColorprocedure 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 theForeColorandBackColorprocedures, 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
PenPixPatprocedure. To assign a pixel pattern as the background pattern, you can use theBackPixPatprocedure; this allows theScrollRectprocedure 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
SetCPixelprocedure.The
FillCRect,FillCRoundRect,FillCOval,FillCArc,FillCPoly, andFillCRgnprocedures allow you to fill shapes with multicolored patterns.To change the highlight color for the current color graphics port, use the
HiliteColorprocedure. To set values used by arithmetic transfer modes, use theOpColorprocedure.As described in "Copying Pixels Between Color Graphics Ports" beginning on page 4-22, you can also use the basic QuickDraw procedures
CopyBits,CopyMask, andCopyDeepMaskto 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