Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ polyline(3G) — HP-UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

draw(3G)

inquire_current_position(3G)

line_color(3G)

line_endpoint(3G)

line_repeat_length(3G)

line_type(3G)

line_width(3G)

move(3G)

vertex_format(3G)

POLYLINE(3G)

NAME

dcpolyline, intpolyline2d, polyline2d, polyline3d − move/draw between specified points

SYNOPSIS

C Syntax:

void dcpolyline(fildes,clist,numpts,flags);
int fildes,numpts,flags,clist[];

void intpolyline2d(fildes,clist,numpts,flags);
int fildes,numpts,flags,clist[];

void polyline2d(fildes,clist,numpts,flags);
int fildes,numpts,flags;
float clist[];

void polyline3d(fildes,clist,numpts,flags);
int fildes,numpts,flags;
float clist[];

FORTRAN77 Syntax:

subroutine dcpolyline(fildes,clist,numpts,flags)
integer*4 fildes,numpts,flags,clist(numpts*(2+flags))

subroutine intpolyline2d(fildes,clist,numpts,flags)
integer*4 fildes,numpts,flags,clist(numpts*(2+flags))

subroutine polyline2d(fildes,clist,numpts,flags)
integer*4 fildes,numpts,flags
real clist(numpts*(2+flags))

subroutine polyline3d(fildes,clist,numpts,flags)
integer*4 fildes,numpts,flags
real clist(numpts*(3+flags))

Pascal Syntax:

procedure dcpolyline(fildes:integer;var clist:array[lo..hi:integer]
of integer;numpts,flags:integer);

procedure intpolyline2d(fildes:integer;var clist:array[lo..hi:integer]
of integer;numpts,flags:integer);

procedure polyline2d(fildes:integer;var clist:array[lo..hi:integer]
of real;numpts,flags:integer);

procedure polyline3d(fildes:integer;var clist:array[lo..hi:integer]
of real;numpts,flags:integer);

DESCRIPTION

Input Parameters

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

clist Array of virtual device coordinate data, modelling coordinate data, or world coordinate data used by polyline2d, intpolyline2d, and polyline3d or device coordinate data used by dcpolyline. This data may contain extra coordinates and move/draw indicators embedded after each endpoint.

numpts Defines the number of endpoints in the clist array.  If numpts is less than zero, zero is substituted.  A numpts greater than 32767 is not allowed. 

flags If set to FALSE (0), the first endpoint represents a move and subsequent endpoints represent draws. 
If set to TRUE (1), the move/draw indicators define whether a move or draw is performed for the corresponding endpoints.  For each endpoint, if the corresponding move/draw indicator is non-zero (draw), a line is drawn from the current position to the endpoint. Otherwise, the current position is simply updated to the position of the endpoint. 

Discussion

Polyline draws a series of line segments in the current line_color and line_type. A color can be specified for each endpoint, and the specified color can override line_color (see vertex_format for details).  As with all output primitives, polyline is affected by the current drawing_mode and write_enable.

The line type pattern is continuous throughout a polyline. 

Each entry in the clist can contain any number of coordinates.  The actual number depends on the coord parameter specified in vertex_format .  The coord parameter can be used to skip over any extra coordinates following the usual 2, 3, or 4 that can be specified with this procedure.  Vertex move/draw flags follow the skipped extra coordinates. 

The use parameter specified in vertex_format determines whether any of the extra parameters are used to determine the color of the primitive.  ( vertex_format does not apply to intpolyline2d .)  The following shows what order the data is expected.  Any extra coordinates are skipped. 

use=0 For 2d, dc,: x,y,...,(flag)
For 3d: x,y,z,...,(flag)

use=1 For 2d, dc,: x,y,i,...,(flag)
For 3d: x,y,z,i,...,(flag)

use=3 For 2d, dc,: x,y,a,b,c,...,(flag)
For 3d: x,y,z,a,b,c,...,(flag)

The world-coordinate current pen position is not related to the device current pen position.  When mixing the use of these coordinate systems, always make a move to a known pen position before executing a draw procedure. 

All extra parameters may be ignored by some devices. 

Integer operations are only available when using the INT_XFORM gopen mode. When in INT_XFORM mode, floating point operations are not available for that fildes. Floating point operations are the default, or can be specified with FLOAT_XFORM mode. For a list of integer operations, floating point operations and common operations see the starbase(3G) manual page. 

For increased performance of small polylines (numpts < 10) macros can be used to generate in-line code for C. See "Polyline Macros" in Starbase Graphics Techniques − HP-UX Concepts and Tutorials. 
 

SEE ALSO

draw(3G), inquire_current_position(3G), line_color(3G), line_endpoint(3G), line_repeat_length(3G), line_type(3G), line_width(3G), move(3G), vertex_format(3G), Starbase Graphics Techniques. 

Hewlett-Packard Company  —  May 11, 2021

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