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 3 - QuickDraw Drawing / QuickDraw Drawing Reference
Routines / Drawing With the Eight-Color System


ForeColor

To change the color of the "ink" used for framing, painting, and filling on computers that support only basic QuickDraw, you can use the ForeColor procedure.

PROCEDURE ForeColor (color: LongInt); 
color
One of eight color values. You can use the following constants to represent these values:
           CONST
              whiteColor     =\xDD30;
              blackColor     =\xDD33;
              yellowColor    =\xDD69;
              magentaColor   =\xDD137;
              redColor       =\xDD205;
              cyanColor      =\xDD273;
              greenColor     =\xDD341;
              blueColor      =\xDD409;
DESCRIPTION
The ForeColor procedure sets the foreground color for the current graphics port to the color that you specify in the color parameter. When you draw with the patCopy and srcCopy transfer modes, for example, black pixels are drawn in the color you specify with ForeColor.

SPECIAL CONSIDERATIONS
The ForeColor procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.

SEE ALSO
All nonwhite colors appear as black on black-and-white screens. Before you use ForeColor, you can use the DeviceLoop procedure, which is described in the chapter "Graphics Devices," to determine the color characteristics of the current screen.

In System 7, you may instead use the Color QuickDraw procedure RGBForeColor, which is described in the chapter "Color QuickDraw."


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996