INQUIRE_COLOR_TABLE(3G)
NAME
inquire_color_table − return current color table settings for specified graphic device
SYNOPSIS
C Syntax:
void inquire_color_table(fildes,start,count,response);
int fildes,start,count;
float response[][3];
FORTRAN77 Syntax:
subroutine inquire_color_table(fildes,start,count,response)
integer*4 fildes,start,count
real response(3,count)
Pascal Syntax:
procedure inquire_color_table(fildes,start,count:integer;
var response:array[lo..hi:integer]of rgb_color);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
start Integer index into the device color table at which to start the color table report. The first item in the color table is at index 0 (zero).
count Integer value, equal to the number of color table entries to report minus one (1). Value range is zero (1 entry) through one fewer than the number of colors available on the device (255 for 256-color device). To determine the number of available color table entries on a device, use inquire_size.
Output Parameters
response Returns red, green, and blue values for each color table entry (values are in the range of zero (0.0) to one (1.0), where 1.0 is full intensity). In C terminology-
response[0][0] = color_table[start][0];
response[0][1] = color_table[start][1];
response[0][2] = color_table[start][2];
...
response[count-1][2] = color_table[start+count-1][2];
Discussion
Each file descriptor (fildes) opened as an output device has a color table associated with it. When this procedure is called, the color table is returned. If multiple file descriptors are open to the same device, the color table and the device’s color map may not always be identical.
Some device drivers have a gescape (READ_COLOR_MAP) that reads the current color map into the color table. See the appropriate device driver description for more information.
For multi-bank graphics devices:
16 Planes Each bank of 8 has the same color map.
24 Planes If the mode parameter of shade_mode is set to CMAP_FULL and an inquire operation is performed on the color table, blue entries specify the intensities of bank 1, green applies to bank 2, and red to bank 3. Otherwise the device appears to be a standard 8-plane graphics device.
SEE ALSO
define_color_table(3G), shade_mode(3G), Starbase Device Drivers Library
Hewlett-Packard Company — May 11, 2021