POLYLINE(3G)
NAME
polyline − moves/draws between specified points.
SYNOPSIS
C SYNTAX
void polyline2d(fildes,clist,numpts,flags);
int fildes,numpts,flags;
float clist[];
void polyline3d(fildes,clist,numpts,flags);
int fildes,numpts,flags;
float clist[];
void dcpolyline(fildes,clist,numpts,flags);
int fildes,numpts,flags;
int clist[];
FORTRAN77 SYNTAX
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))
subroutine dcpolyline(fildes,clist,numpts,flags)
integer*4 fildes,numpts,flags,clist(numpts*(2+flags))
PASCAL SYNTAX
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);
procedure dcpolyline(fildes:integer;
var clist:array[lo..hi:integer] of integer;
numpts,flags:integer);
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 an I/O path to a graphic device is opened.
clist
array of real (for polyline2d and polyline3d) or device (for dcpolyline) coordinate data with or without move/draw indicators embedded after each endpoint
numpts
defines the number of endpoints in the clist array. If a value is specified that is smaller that actual number of endpoints in the array, an appropriate line will be drawn. Number of points must be less than 65535 or it wil be truncated.
flags
If set to FALSE (0), the first endpoint represents a move and subsequent ones 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. For example:
2-dimensions 3_dimensions
x1 x1
y1 y1
m/d z1
x2 m/d
y2 x2
. .
. .
. .
Move-draw indicators occupy the same space as one coordinate and are interspersed with the coordinate data. All bits of the indicator must be zero to indicate a move (integer 0 or real 0.0). If the data is 2d, each (x,y) pair of coordinates is followed by a move draw indicator. If the data is 3d, each (x,y,z) triplet is followed by a move-draw indicator.
DISCUSSION
Polyline draws a series of line segments in the current line_color and line_type. As with all output primitives it is affected by the current drawing_mode and write_enable.
The line type pattern will be continous throughout a polyline.
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 or dcdraw procedure.
SEE ALSO
draw(3g), line_color(3g), line_type(3g), line_repeat_length(3g), move(3g).
Hewlett-Packard — last mod. May 11, 2021