| Home
| Previous
| Next
| Up

MGL_packColor

Pack an RGB tuple into an MGL color.

Declaration

color_t MGLAPI MGL_packColor(
pixel_format_t *pf,
uchar R,
uchar G,
uchar B)

Prototype In

mgraph.h

Parameters

pf | Pixel format to get packing information from
R | Red color component to pack (0 - 255)
G | Green color component to pack (0 - 255)
B | Blue color component to pack (0 - 255)

Return Value

MGL packed color value appropriate for the specified pixel format information.

Description

This function takes an RGB tuple of 8 bit color components and packs them into an MGL packed color value. The color components are packed according to the specified pixel format information, which can be obtained directly from the mode information for a bitmap or an MGL device context.

See Also

MGL_packColorFast, MGL_packColorExt, MGL_unpackColor, MGL_getPixelFormat

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