Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ marker_colo(3G) — HP-UX 9.03

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

define_color_table(3G)

inquire_color_table(3G)

inquire_sizes(3G)

polymarker(3G)

shade_mode(3G)

marker_color(3G)

NAME

marker_color − select 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);

DESCRIPTION

Input Parameters

fildes Integer file descriptor returned by gopen when an I/O path to a graphic device is opened. 

index Integer index into the device color table.  The marker color is the red, green, and blue values specified at this table location.  The size of the color table can be obtained by using the inquire_sizes procedure. 

red, green, blue Color values (in the range of 0.0 to 1.0) to be used for subsequent polymarker primitives. Zero (0.0) indicates no color and one (1.0) indicates full color.  Monochrome and grayscale 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. 

Polymarker primitives are altered by this procedure. 

When the marker color is set using red, green, and blue parameters, determination of actual output depends on the state of the mode parameter set by shade_mode:

CMAP_NORMAL Default mode if shade_mode has not been called.  The color table is searched for an index pointing to the color in RGB space that most closely matches the one specified.  Specification by index is faster than color map searches. 

CMAP_MONOTONIC Color values are converted to intensity using the equation:
I = 0.30(red) + 0.59(green) + 0.11(blue). 
This intensity is mapped to an index where minimum and maximum intensity is defined by shade_range.

CMAP_FULL Color values are mapped directly to a index with the assumption that the color map is set up to a predefined full color state. 

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

Default marker color is the color defined in the current color map at index 1. 

SEE ALSO

define_color_table(3G), inquire_color_table(3G), inquire_sizes(3G), polymarker(3G),
shade_mode(3G).

Hewlett-Packard Company  —  HP-UX Release 9.03: April 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026