fg_unmaprgb()

Win32 DirectX Fastgraph/Light

Prototype

void fg_unmaprgb (int color, int *red, int *green, int *blue);

Sub fg_unmaprgb (ByVal color As Long, red As Long, green As Long, blue As Long)

procedure fg_unmaprgb (color : integer; var red, green, blue : integer);

Description

The fg_unmaprgb() function extracts the red, green, and blue color components from an encoded 16-bit or 32-bit color value.

Parameters

color is the encoded color value. For high color virtual buffers, color is a 16-bit encoded RGB value. For true color virtual buffers, color is a 32-bit value encoded as four 8-bit color components (xRGB).

red receives the encoded color value's red component, between 0 and 255.

green receives the encoded color value's green component, between 0 and 255.

blue receives the encoded color value's blue component, between 0 and 255.

Return value

none

Restrictions

This function is meaningful only with direct color virtual buffers.

See also

fg_maprgb(), fg_setrgb()

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.