Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ppolyline(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

POLYLINE(3P)  —  SUNPHIGS LIBRARY

NAME

POLYLINE − create structure element specifying 2D polyline

SYNOPSIS

C Syntax

void
ppolyline ( num_points, points )
Pintnum_points;number of points
Ppoint∗points;array of points

FORTRAN Syntax

SUBROUTINE ppl ( N, PXA, PYA )
INTEGERNnumber of points
REALPXA(N), PYA(N)coordinates of points (MC)

Required PHIGS Operating States

(PHOP, ∗, STOP, ∗)

DESCRIPTION

Purpose

The POLYLINE function places a structure element containing the full specification of a 2D polyline into the currently open structure, according to the current edit mode.  A 2D polyline primitive is a set of connected straight lines in two dimensions, x and y.  The z coordinate is assumed to be 0. The polyline is defined by a series of points in Modelling Coordinates. A polyline may be closed or intersect itself. 

If the current edit mode is INSERT, the POLYLINE element is inserted into the open structure after the element pointed to by the element pointer. If the edit mode is REPLACE, the POLYLINE element replaces the element pointed to by the element pointer. In either case, the element pointer is updated to point to the new POLYLINE element. 

C Input Parameters

num_points
Specifies the number of points to be used to define the polyline. You must specify at least two points; a polyline structure element that has fewer than two points will be ignored when the structure is traversed.

pointsA pointer to a list num_points long of Ppoint structures containing the x and y coordinates for each point.  The Ppoint structure is defined in phigs.h as follows:

typedef struct  {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
} Ppoint;

FORTRAN Input Parameters

NThe number of points used to define the polyline.  You must specify at least two points; a polyline structure element that has fewer than two points will be ignored when the structure is traversed. 

PXAAn array of N real values containing the x coordinates of the polyline. 

PYAAn array of N real values containing the y coordinates of the polyline. 

Execution

When the structure is traversed, the polyline element draws straight lines between the points specified, beginning with the first point and ending with the last. The current values of the attributes listed below will be applied to the polyline when it is drawn. 

The coordinates used to specify the polyline primitive are Modelling Coordinates. These may be any coordinate units that are convenient to the application. At traversal, these coordinate values will be transformed by the current Local and Global Modelling Transformations, the View Representation selected by the ‘current view index’, and the Workstation Transformation current on the workstation to which the structure is posted. 

Attributes Applied

The attributes listed below are used to display the POLYLINE primitive when the structure is traversed. The Aspect Source Flags (ASFs) tell where to access the output display attributes.  These attributes can come directly from the traversal state list, or they can be accessed indirectly, using the appropriate index in the traversal state list and the corresponding bundled representation in the workstation state list. 

polyline colourpolyline colour index ASF
linewidth scale factorlinewidth scale factor ASF
linetypelinetype ASF
polyline shading methodpolyline shading method ASF
polyline index
depth cue index
name set

ERRORS

005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)

SEE ALSO

INQUIRE POLYLINE FACILITIES (3P)
POLYLINE 3 (3P)
POLYLINE SET 3 WITH DATA (3P+)

Sun Release 4.0  —  Last change: 29 July 1989

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