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: Advanced Color Imaging Reference /
Chapter 1 - Palette Manager Reference /
Palette Manager Functions / Drawing With Color Palettes


RestoreFore

Sets the current foreground color to the color you supply.

pascal void RestoreFore(const ColorSpec *c);
c
A pointer to a ColorSpec structure (described in the chapter "Color QuickDraw" of Inside Macintosh: Imaging With QuickDraw) containing the RGB color to be set as the foreground color.
DISCUSSION
The RestoreFore function stores the RGB color of the ColorSpec structure you specify by the c parameter as the current foreground color. You can store the color into either the Color QuickDraw foreground color in the CGrafPort structure or the Palette Manager foreground color in the GrafVars structure. If you specify 0 in the value field of the ColorSpec structure, the RestoreFore function stores the RGB value in the rgbFgColor field of the current CGrafPort structure. If you specify 1 in the value field of the ColorSpec structure, the RestoreFore function stores the RGB value in the pmFgColor field of the GrafVars structure.

IMPORTANT
The RestoreFore function is available only with system software versions 6.0.5 and later and with the 32-Bit QuickDraw system extension.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996