MARKER_COLOR(3G)
NAME
marker_color − select the color for subsequent polymarker primitives.
SYNOPSIS
C SYNTAX
void marker_color_index(fildes,index);
int fildes,index;
void marker_color(fildes,red,green,blue);
int fildes;
float red,green,blue;
FORTRAN77 SYNTAX
subroutine marker_color_index(fildes,index)
integer*4 fildes,index
subroutine marker_color(fildes,red,green,blue)
integer*4 fildes
real red,green,blue
PASCAL SYNTAX
procedure marker_color_index(fildes,index:integer);
procedure marker_color(fildes:integer;red,green,blue:real);
HP-UX COMPATIBILITY
Level: HP-UX/STANDARD
Origin: HP
DESCRIPTION
INPUT PARAMETERS
fildes
is an integer file descriptor returned by gopen when the I/O path to the output graphic device is opened.
index
is an index into the device color table associated with the device specified by the file descriptor. The color value at this location in the table will be used for subsequent polymarker primitives. The number of colors in the color table can be found using the inquire_sizes procedure.
red, green, blue
the color values (in the range 0.0 to 1.0) to be used for subsequent polymarker primitives.
DISCUSSION
To acquire the current color table definition, use the inquire_color_table command. To change the current color table definition, use the define_color_table command.
For pen devices, and non-color mapped color devices, a default color map can be created/changed to reflect the actual state of the device.
To obtain a specific color, use the red, green, blue color values to specify the combination desired. The color values are in the range 0.0 (none) to 1.0 (full).
Using marker_color on a color mapped device requires a search for the closest matching color in the color table. Using marker-color_index is much more efficient for these devices.
The closest color is the first color table entry closest to the desired color in RGB space at the time this procedure is called. If the color map is changed after this procedure is called, the marker color used may not be the original color desired.
If the index is out of range, a warning is generated and a mod function is performed.
DEFAULTS
color map index 1.
SEE ALSO
define_color_table(3g), inquire_color_table(3g), inquire_sizes(3g).
Hewlett-Packard — last mod. May 11, 2021