PARTIAL_POLYGON(3G)
NAME
partial_polygon − define group of polygon vertices that begins as subpolygon or non-edged boundary
SYNOPSIS
C Syntax:
void partial_polygon2d(fildes,clist,numverts,flags,closure);
int fildes,numverts,flags,closure;
float clist[];
void partial_polygon3d(fildes,clist,numverts,flags,closure);
int fildes, numverts,flags,closure;
float clist[];
void dcpartial_polygon(fildes,clist,numverts,flags,closure);
int fildes,numverts,flags,closure,clist[];
FORTRAN77 Syntax:
subroutine partial_polygon2d(fildes,clist,numverts,flags,closure)
integer*4 fildes,numverts,flags,closure
real clist(numverts*(2+flags))
subroutine partial_polygon3d(fildes,clist,numverts,flags,closure)
integer*4 fildes,numverts,flags,closure
real clist(numverts*(3+flags))
subroutine dcpartial_polygon(fildes,clist,numverts,flags,closure)
integer*4 fildes,numverts,flags,closure
integer*4 clist(numverts*(2+flags))
Pascal Syntax:
procedure partial_polygon2d(fildes:integer;var clist:
array[lo..hi:integer] of real;numverts,flags,
closure:integer);
procedure partial_polygon3d(fildes:integer;var clist:
array[lo..hi:integer] of real;numverts,flags,
closure:integer);
procedure dcpartial_polygon(fildes:integer;var clist:
array[lo..hi:integer] of integer;numverts,flags,
closure:integer);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
flags If FALSE (0), the first vertex represents a non-drawn boundary. The remaining vertices represent drawn boundaries if interior_style is set to be edged.
If TRUE (1), each polygon edge can be either a drawn boundary or a non-drawn boundary, depending on the value of the corresponding move-draw indicator and whether or not interior style is set to be edged. If the indicator (found after each x,y[,z] vertex) is non-zero (draw) and interior style is set to be edged, the boundary is drawn. Otherwise, it is not drawn. The only purpose for non-drawn boundaries is to define the edge of the filled area.
closure If TRUE (1), the polygon vertex list is non-empty, and the last subpolygon is not yet closed, a boundary is added to close that subpolygon within the boundary. If the first polygon vertex in the partial polygon had a draw indicator, the closure boundary is drawn. Otherwise, it is not drawn. Partial_polygon then adds the vertices in clist to the polygon vertex list.
clist An array of integer (for dcpartial_polygon) or real (for partial_polygon) endpoint values with or without move/draw indicators embedded after each endpoint.
numverts Number of polygon vertices in the clist array. If the value is less than zero, zero is substituted.
Discussion
Partial_polygon puts polygon vertices into an internal polygon data structure. Only after a call is made to polygon or rectangle will the polygon be rendered. Partial_polygon is most commonly used to create "holes" in polygons.
Each vertex 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.
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 list shows in what order the data is expected for each vertex. 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)
If normals per polygon is specified in vertex_format, the normal is contained in the polygon vertex list; not in the partial_polygon list. If a normal needs to be calculated, the first 3 points of the first partial_polygon are used. The vertex list for the first partial polygon must contain at least 3 points or the normal cannot be calculated correctly.
SEE ALSO
drawing_mode(3G), fill_color(3G), interior_style(3G), perimeter_color(3G),
perimeter_type(3G), perimeter_repeat_length(3G), polygon(3G),
write_enable(3G).
NOTE
Any Starbase call other than partial_polygon2d, partial_polygon3d, partial_arc, partial_ellipse, or dcpartial_polygon, in the middle of a list of these procedure calls and before a call to polygon or rectangle produces unpredictable, device-dependent results.
Hewlett-Packard Company — May 11, 2021