fg_setdacs()

Win32 DirectX Fastgraph/Light

Prototype

void fg_setdacs (int start, int count, void *values);

Sub fg_setdacs (ByVal start As Long, ByVal count As Long, values() As Any)

procedure fg_setdacs (start, count : integer; var values);

Description

The fg_setdacs() function defines the red, green, and blue color components of a consecutive group of colors in the active logical palette or virtual palette. Defining many colors with fg_setdacs() is faster than doing so individually with fg_setrgb().

Parameters

start is the starting color number, between 0 and 255.

count is the number of consecutive colors to define, between 1 and 256. The sum of start and count cannot exceed 256.

values is the name of the array containing the color components. The first three bytes of this array must contain the red, green, and blue components for color start, the next three bytes contain the components for color start+1, and so forth. Each color component is a value between 0 and 255; increasing values produce more intense colors. The size of the values array must be at least 3*count bytes.

Return value

none

Restrictions

Before calling fg_setdacs(), a logical palette must be defined and realized.

See also

fg_getdacs(), fg_mapdacs(), fg_realize(), fg_setrgb()

Examples

Fade, Rainbow

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.