Last: pvitv Up: ../plot79_p.html Next: pgna3
SUBROUTINE PGNA2 (XARRAY,INCX, YARRAY,INCY, NVERTX) C$ (Polygon Absolute 2-D) C$ Draw a 2-D polygon. A move is automatically made to the C$ first vertex, and then implicit closure is provided by C$ connecting the last vertex to the first, and the current C$ point is left at the first vertex. If a polygon "plain" C$ interior style filling and a visible pattern or color has C$ been selected by a prior call to SETPIS and SETPFI/SETPCI, C$ the polygon is filled with that pattern or color. The C$ polygon vertices are assumed to be arranged so that the C$ interior lies to the left of each line segment between C$ vertices i and i+1. Drawing and filling is suppressed if C$ the polygon lies entirely outside the current viewport. C$ The arguments are: C$ C$ XARRAY(*)........Array of X coordinates. C$ INCX.............Displacement between successive X C$ coordinates in XARRAY(*) (normally 1). C$ YARRAY(*)........Array of Y coordinates. C$ INCY.............Displacement between successive Y C$ coordinates in YARRAY(*) (normally 1). C$ NVERTX...........Number of polygon vertices (.GE. 3). C$ C$ If an increment INCX or INCY is negative, the starting C$ vertex is taken as (1-N)*INC + 1 instead of 1, so that the C$ array is stepped through in reverse order. Because of the C$ ordering convention on the vertices, reversing the order of C$ traversal of the vertex list interchanges the interior and C$ the exterior of the polygon. No error is raised if there C$ are fewer than 3 vertices, but filling will be suppressed. C$ (14-SEP-87)