DEFINE_COLOR_TABLE(3G)
NAME
define_color_table − set the color values in the device color table.
SYNOPSIS
C SYNTAX
void define_color_table(fildes,start,count,colors);
int fildes,start,count;
float colors[][3];
FORTRAN77 SYNTAX
subroutine define_color_table(fildes,start,
count,colors)
integer*4 fildes,start,count
real colors(3,count)
PASCAL SYNTAX
type
rgb_color=array[1..3]of real;
procedure define_color_table(fildes,start,count:integer;
var colors array:[lo..hi:integer]of rgb_color);
HP-UX COMPATIBILITY
Level: HP-UX/STANDARD
Origin: ANSI Computer Graphics Interface
DESCRIPTION
INPUT PARAMETERS
fildes
is an integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
start
is the integer index into the color table at which to start the color table update.
count
is the integer number of color table entries to be updated.
colors
is the new red,green,blue values for each color table entry (values in the range of 0.0 to 1.0, where 1.0 is full intensity.) In C terminology-
color_table[start][0] = colors[0][0]; /* red */
color_table[start][1] = colors[0][1]; /* green */
color_table[start][2] = colors[0][2]; /* blue */
...
color_table[start+count-1][2] = colors[count-1][2]
DISCUSSION
Each file descriptor opened as an output device has a color table. When this procedure is called, the color table, and the device’s color map, are updated. If multiple file descriptors are open to the same device, the color table, and the device’s color map , may not always be identical. For Starbase procedures that have red, green and blue parameters, it is the color table that is searched for the closest color.
Some device drivers have a gescape that will read the current color map into the color table. See the appropriate device driver description for more information.
DEFAULTS
All color maps are device dependent.
SEE ALSO
Starbase Device Drivers Library, inquire_color_table(3g), inquire_size(3g).
Hewlett-Packard — last mod. May 11, 2021