|
|
|
|
MGL_rgbColor
Computes a packed MGL color from a 24 bit RGB tuple.
Declaration
color_t MGLAPI MGL_rgbColor(
MGLDC *dc,
uint R,
uint G,
uint B)
Prototype In
mgraph.h
Parameters
dc |
Device context to map color with |
R |
Red component of color to map (0 - 255) |
G |
Green component of color to map (0 - 255) |
B |
Blue component of color to map (0 - 255) |
Return Value
Packed MGL color closest to specified RGB tuple.
Description
This function computes the packed MGL color value from a specific 24 bit RGB tuple for a device context. If the device context is an RGB device context or an 8 bit device in RGB dithered mode, this value simply returns the proper packed MGL pixel value representing this color (the same as MGL_packColor would). However if the device context is a color index device, the color palette is searched for the color value that is the closest to the specified color. This function allows you to specify a color given an RGB tuple, and will work in color index modes as well with any color palette.
See Also
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com