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 / Determining Current Colors and Best Intermediate Colors


Use the GetForeColor procedure to obtain the color of the foreground color for the current graphics port.

PROCEDURE GetForeColor (VAR color: RGBColor);
An RGBColor record.
In the color parameter, the GetForeColor procedure returns the RGBColor record for the foreground color of the current graphics port. This procedure operates for graphics ports defined by both the GrafPort and CGrafPort records. If the current graphics port is defined by a CGrafPort record, the returned value is taken directly from the rgbFgColor field.

If the current graphics port is defined by a GrafPort record, then only eight possible RGB values can be returned. These eight values are determined by the values in a global variable named QDColors, which is a handle to a color table containing the current QuickDraw colors. These colors are listed in Table 4-4 on page 4-62. This default set of colors has been adjusted to match the colors produced on the ImageWriter II printer.

This procedure is available for basic QuickDraw only in System 7.

You can use the RGBForeColor procedure, described on page 4-61, to change the foreground color.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996