LINE_COLOR(3G)
NAME
line_color − selects the color index or color value for subsequent line primitives.
SYNOPSIS
C SYNTAX
void line_color_index(fildes,index)
int fildes,index;
void line_color(fildes,red,green,blue)
int fildes;
float red,green,blue;
FORTRAN77 SYNTAX
subroutine line_color_index(fildes,index)
integer*4 fildes,index;
subroutine line_color(fildes,red,green,blue)
integer*4 fildes;
real red,green,blue;
PASCAL SYNTAX
procedure line_color_index(fildes,index:integer);
procedure line_color(fildes:integer;red,green,blue:real);
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 the I/O path to the output graphic device is opened.
index
is an integer index into the device color table. The line color is the red, green and blue values specified at this table location. The size of the color table may be obtained using the inquire_sizes procedure.
red, green, blue
are the color values (in the range of 0.0 to 1.0) to be used for subsequent line primitives. Zero (0.0) indicates no color and one (1.0) indicates full color. Monochrome devices use the equation I=0.30*red+0.59*green+0.11*blue to determine the intensity.
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 procedure.
The draw and polyline primitives are effected by this procedure.
To obtain a specific color, use the red, green, blue color values to specify the combination desired.
Using line_color on a color mapped device requires a search for the closest matching color in the color table. Using line-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 line 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
The default line color is the color defined in the current color map at index 1.
SEE ALSO
define_color_table(3g), draw(3g), inquire_color_table(3g), marker_color(3g), perimeter_color(3g), polyline(3g), text_color(3g).
Hewlett-Packard — last mod. May 11, 2021