Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 4 - Color QuickDraw / Color QuickDraw Reference
Color QuickDraw Routines


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 the PmForeColor and PmBackColor routines, as described in the chapter "Palette Manager" in Inside Macintosh: Advanced Color Imaging. Otherwise, it can use the RGBForeColor procedure to set the foreground color, and it can use the RGBBackColor 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 the ForeColor and BackColor 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 the BackPixPat procedure; this allows the ScrollRect 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, and FillCRgn 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 the OpColor 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, and CopyDeepMask 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

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996