MGL_realColor

Returns the real packed MGL color for a color index.

Declaration

color_t MGLAPI MGL_realColor(
    MGLDC *dc,
    int color)

Prototype In

mgraph.h

Parameters

dc

Device context to map color with

color

Color to map

 

Return Value

Real packed MGL color value for the color index.

Description

This function returns a packed MGL color value appropriate for the specified device context given a color index. This routine works with all device contexts, including RGB device contexts. For the color index devices, the value is simply returned unchanged. However for RGB devices, the color index is translated via the current color palette for the device to find the appropriate packed MGL color value for that device. Thus you can still write code for RGB devices that works with color indexes (although you cannot do things like hardware palette fades and rotates as the palette is implemented in software).

See Also

MGL_setColorCI, MGL_setColorRGB, MGL_setPalette, MGL_getPalette

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com