Carbon


PmForeColor

Header: Palettes.h Carbon status: Supported

Sets the foreground color field of the current graphics port to a palette color.

void PmForeColor (
    SInt16 dstEntry
);
Parameter descriptions
dstEntry

The palette entry whose color is to be used as the foreground color.

DISCUSSION

The PmForeColor function sets the current color graphics port’s rgbFgColor field to match the color in the entry specified by the dstEntry parameter of the palette associated with the current window structure. For courteous and tolerant entries, PmForeColor calls the RGBForeColor function using the RGB color of the palette entry. For animated colors, PmForeColor selects the recorded device index previously reserved for animation (if still present) and installs it in the color graphics port. The RGB foreground color field is set to the value from the palette entry. For explicit colors, PmForeColor places the value

dstEntry modulo (maxIndex +1)

into the color graphics port, where maxIndex is the largest index available in a device’s color table. When multiple devices with different depths are present, the value of maxIndex varies appropriately for each device.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)