Supported Browsers Home   
MGL_setColorCI Previous   
MGL_setDefaultPalette Next   
External Functions Up   

MGL_setColorRGB

Sets the current foreground color given a 24 bit RGB tuple.

Declaration

void MGLAPI MGL_setColorRGB(
    uchar R,
    uchar G,
    uchar B)

Prototype In

mgraph.h

Parameters

R

Red component of color (0 - 255)

G

Green component of color (0 - 255)

B

Blue component of color (0 - 255)

 

Description

This function sets the foreground color to a specific 24 bit RGB tuple. If the device context is an RGB device context or an 8 bit device in RGB dithered mode, this value simply sets 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

MGL_setColor, MGL_setColorCI, MGL_rgbColor

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