MGL_setPaletteEntry
Sets a single palette entry.
Declaration
void MGLAPI MGL_setPaletteEntry(
MGLDC *dc,
int entry,
uchar red,
uchar green,
uchar blue)
Prototype In
mgraph.h
Parameters
dc |
Device context to set palette entry in |
entry |
Palette index to program |
red |
Red component for palette entry |
green |
Green component for palette entry |
blue |
Blue component for palette entry |
Description
Sets the color values of a single palette entry. If you wish to set more than a single palette index you should use the
MGL_setPalette routine which is faster for multiple entries. Note that this routine does not actually change the value of the hardware palette, and if you wish to change the hardware palette to reflect the new values, you will need to call the MGL_realizePalette function to update the hardware palette.
This function is also valid for RGB device contexts, and will simply set the color translation tables for these devices (used for drawing color index bitmaps and translating color index color values to RGB values).
See Also
MGL_getPaletteEntry, MGL_setPalette, MGL_getPalette, MGL_realizePalette
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com