highlight(3G)
NAME
highlight − specify highlighting color, style, and attributes
SYNOPSIS
C Syntax:
void highlight_color_index(fildes, index);
int fildes, index;
void highlight_color(fildes, red, green, blue);
int fildes;
float red, green, blue;
void highlight_type(fildes, style);
int fildes, style;
void highlight_attributes(fildes, attrs);
int fildes, attrs;
void highlight_on(fildes, flag);
int fildes, flag;
FORTRAN77 Syntax:
subroutine highlight_color_index(fildes, index)
integer∗4 fildes, index
subroutine highlight_color(fildes, red, green, blue)
integer∗4 fildes, index
real red, green, blue
subroutine highlight_type(fildes, style)
integer∗4 fildes, style
subroutine highlight_attributes(fildes, attrs)
integer∗4 fildes, attrs
subroutine highlight_on(fildes, flag)
integer∗4 fildes, flag
Pascal Syntax:
procedure highlight_color_index(fildes,index:integer);
procedure highlight_color(fildes:integer; red,green,blue:real);
procedure highlight_type(fildes,style:integer;);
procedure highlight_attributes(fildes,attrs:integer;);
procedure highlight_on(fildes,flag:integer;);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
index is the color map entry that designates the color to use for drawing primitives affected by highlight.
red,green,blue are floating point color intensity values that designate the color to use for drawing primitives affected by highlight.
style may be SOLID, DASH, DOT, DASH_DOT, DASH_DOT_DOT, LONG_DASH, CENTER_DASH, and CENTER_DASH_DASH -- see line_type for more information on styles.
attrs is HL_COLOR, HL_STYLE, or (HL_COLOR | HL_STYLE).
HL_COLOR
• designates that color is to be used for highlighting text, markers, lines, filled-area edges, and hatched interiors
HL_STYLE
• designates that a line style is to be used for highlighting text, markers, lines, filled-area edges, and hatched interiors
flag is TRUE or FALSE.
TRUE
• turns highlight on
• postpones the effect of all attribute routines that are overridden by the highlight_attributes’ attrs value (see discussion below)
• will NOT affect the rendering of filled-areas
FALSE
• turns highlight off
• restores attributes to what they would have been had highlight never been turned on
• enables all attribute routines to take effect immediately when they are called (see discussion below)
Discussion
Highlight_color_index allows the user to designate the color to be used when highlighting is on and HL_COLOR is in effect. This routine can NOT be called while highlighting is turned on; Starbase will generate a warning if it is called while highlighting is active.
Highlight_color is identical to highlight_color_index except that it allows the user to specify the highlight color in terms of floating point RGB values. This routine can NOT be called while highlighting is turned on; Starbase will generate a warning if it is called while highlighting is active.
Highlight_style allows the user to designate the line style to be used when highlighting is on and HL_STYLE is in effect. This routine can NOT be called while highlighting is turned on; Starbase will generate a warning if it is called while highlighting is active.
Highlight_attributes allows a user to designate how highlighting will be done. It is recommended that HL_STYLE be used only when color will not be effective -- for example, when highlighting must be done on a monochrome device. This routine can NOT be called while highlighting is turned on; Starbase will generate a warning if it is called while highlighting is active.
HL_COLOR has the following effects while highlighting is on:
• overrides line_color(_index), marker_color(_index), text_color(_index), perimeter_color(_index), and bf_perimeter_color(_index) color attribute routines using index or rgb
• forces the edged parameter in interior_style and bf_interior_style to TRUE, resulting in polygons and other filled primitives being edged in the highlight color. If HL_STYLE is active it is edged with the highlight style, otherwise it is edged with the current perimeter style.
• does not override fill_color(_index) or bf_color(_index) for filled-area color, but does override these for hatching color
• does not override vertex data such as rgb or normals per vertex (use highlight_type to highlight primitives with vertex data).
HL_STYLE has the following effects while highlighting is on:
• overrides the line_type, perimeter_type, and bf_perimeter_type style attribute routines using style
• applies a style of DOT to the strokes drawn for highlighted text, markers, and hatching patterns
• applies a device dependent repeat-length to highlighted text, markers, and hatching patterns
• forces the edged parameter in interior_style and bf_interior_style to TRUE, resulting in polygons and other filled primitives being edged with the highlight style. They will be edged in the highlight color if HL_COLOR is also active.
• if HL_COLOR is not active, the the style parameter in interior_style and bf_interior_style is forced to INT_HOLLOW, causing fill-area primitives to be outlined in the style specified and not filled, making the outline visible
Highlight_on allows the user to turn on and off highlight.
The following table summarizes the effect of highlight_attributes:
| Primitive | HL_COLOR | HL_STYLE | HL_COLOR and HL_STYLE |
| Lines | color | style (1) | color and style (1) |
| Text | color | DOT (1) | color and DOT (1) |
| Markers | color | DOT (1) | color and DOT (1) |
| Edging | forced on | forced on | forced on |
| Polygon Edges | color | style (2) | color and style (2) |
| Interior style INT_SOLID | no change | HOLLOW | no change |
| Interior style INT_HATCH | color | HOLLOW | color and DOT (1) |
| Interior style INT_PATTERN | no change | HOLLOW | no change |
(1) line_repeat_length affects the repeat length of line_type.
(2) perimeter_repeat_length (or bf_perimeter_repeat_length) affects the repeat length of polygon edges.
DEFAULTS
| index | = | 2 | style | = | DOT |
| red | = | 1.0 | attrs | = | HL_COLOR |
| green | = | 0.0 | flag | = | FALSE |
| blue | = | 0.0 |
SEE ALSO
interior_style(3G), line_color(3G), line_type(3G), marker_color(3G), perimeter_color(3G), perimeter_type(3G), text_color(3G).
Hewlett-Packard Company — HP-UX Release 9.03: April 1994