fg_maprgb()

Win32 DirectX Fastgraph/Light

Prototype

int fg_maprgb (int red, int green, int blue);

Function fg_maprgb (ByVal red As Long, ByVal green As Long, ByVal blue As Long) As Long

function fg_maprgb (red, green, blue : integer) : integer;

Description

When used with a direct color virtual buffer, fg_maprgb() maps 8-bit red, green, and blue color components into a suitable 16-bit or 24-bit color value, depending on the color depth of the active virtual buffer. When used with a 256-color virtual buffer, fg_maprgb() returns the index of the closest matching color in the logical palette.

Parameters

red, green, and blue respectively specify the color's red, green, and blue components. These values must each be between 0 and 255; increasing values produce more intense colors.

Return value

The color value for the specified RGB components.

Restrictions

none

See also

fg_setcolor(), fg_setcolorrgb(), fg_setrgb(), fg_unmaprgb()

Examples

Columns

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.