POLYLINE(3G)
NAME
polyline − move/draw 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);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphic device is opened.
clist Array of real vdcs, modelling coordinates, or world coordinates (for polyline2d and polyline3d) or device (for dcpolyline) coordinate data with or without 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 If greater than than 65535 numpts is truncated.
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. 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 or dcdraw procedure.
SEE ALSO
draw(3G), line_color(3G), line_type(3G), line_repeat_length(3G), move(3G),
vertex_format(3G).
Hewlett-Packard Company — May 11, 2021