Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ bf_perimete(3G) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bf_control(3G)

define_color_table(3G)

fill_color(3G)

inquire_color_table(3G)

interior_style(3G)

polygon(3G)

shade_mode(3G)

surface_coefficients(3G)

surface_model(3G)

perimeter_color(3G)

NAME

perimeter_color, bf_perimeter_color − select color index or color value for subsequent polygon perimeters, or for backfacing polygon perimeters

SYNOPSIS

C Syntax:

void perimeter_color_index(fildes,index);
int fildes,index;

void perimeter_color(fildes,red,green,blue);
int fildes;
float red,green,blue;

void bf_perimeter_color_index(fildes,index);
int fildes,index;

void bf_perimeter_color(fildes,red,green,blue);
int fildes;
float red,green,blue;

FORTRAN77 Syntax:

subroutine perimeter_color_index(fildes,index)
integer∗4 fildes,index

subroutine perimeter_color(fildes,red,green,blue)
integer∗4 fildes
real red,green,blue

subroutine bf_perimeter_color_index(fildes,index)
integer∗4 fildes,index

subroutine bf_perimeter_color(fildes,red,green,blue)
integer∗4 fildes
real red,green,blue

Pascal Syntax:

procedure perimeter_color_index(fildes,index:integer);

procedure perimeter_color (fildes:integer;red,green,blue:real);

procedure bf_perimeter_color_index(fildes,index:integer);

procedure bf_perimeter_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 perimeter color, or the backfacing perimeter color, is the red, green, and blue values specified at this table location.  The size of the color table can be obtained using the inquire_sizes procedure. 

red, green, blue
Color values (in the range of 0.0 to 1.0) to be used for subsequent polygon perimeters, or backfacing polygon perimeters. Zero (0.0) indicates no color and one (1.0) indicates full color.  To determine the intensity, monochrome and grayscale devices use the equation:
 

I = 0.30 ∗ red + 0.59 ∗ green + 0.11 ∗ blue

 

Discussion

Backfacing polygon edges use the specified perimeter color after bf_control has been called with attr parameter set to TRUE(1). 

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. 

Polygon primitives are altered by this procedure. 

When either the perimeter color or the backfacing perimeter color is set using red, green, and blue parameters, determination of actual output depends on the state of the mode parameter set with shade_mode:

CMAP_NORMAL This is the default mode if shade_mode has not been called.  The color table is searched for an index which points to the closest color in RGB space to the one specified.  Specification by index is faster than color map searches. 

CMAP_MONOTONIC Color values are converted to intensity by using the equation:
 

I = 0.30 ∗ red + 0.59 ∗ green + 0.11 ∗ blue

 

This intensity is mapped to an index using the minimum and maximum defined by shade_range.

CMAP_FULL Color values are mapped directly to an 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 perimeter color, or the backfacing perimeter 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. 

Light source calculations and color coordinates in the polygon vertex list do not affect the color of perimeter, or backfacing perimeter, edges. 

DEFAULTS

Default perimeter color, and backfacing perimeter color, is the color defined in the current color map at index 1. 

SEE ALSO

bf_control(3G), define_color_table(3G), fill_color(3G), inquire_color_table(3G), interior_style(3G), polygon(3G), shade_mode(3G), surface_coefficients(3G), surface_model(3G), Starbase Graphics Techniques. 

Hewlett-Packard Company  —  HP-UX Release 9.10: April 1995

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