FORTRAN (**libfgl.a**)

void poly(Int32n, Coordparray[ ][3])

void polyi(Int32n, Icoordparray[ ][3])

void polys(Int32n, Scoordparray[ ][3])

void poly2(Int32n, Coordparray[ ][2])

void poly2i(Int32n, Icoordparray[ ][2])

void poly2s(Int32n, Scoordparray[ ][2])

SUBROUTINE POLY(n,parray)INTEGER*4nREALparray(3,n)

SUBROUTINE POLYI(n,parray)INTEGER*4nINTEGER*4parray(3,n)

SUBROUTINE POLYS(n,parray)INTEGER*4nINTEGER*2parray(3,n)

SUBROUTINE POLY2(n,parray)INTEGER*4nREALparray(2,n)

SUBROUTINE POLY2I(n,parray)INTEGER*4nINTEGER*4parray(2,n)

SUBROUTINE POLY2S(n,parray)INTEGER*4nINTEGER*2parray(2,n)

The **poly** subroutine draws polygons using the current line attributes:
linestyle,
linewidth,
color, and
writemask. Polygons are represented as arrays of points. The first and last points automatically connect to close a polygon.

Polygons in 2-D are drawn with *z *= 0.

The six different forms for the **poly** subroutine are as follows:

2-D |
3-D | |

Int16 | poly2s | polys |

Int32 | poly2i | polyi |

float | poly2 | poly |

The syntax for each of the subroutine forms is the same except for the first argument. They differ only in that **poly** expects real coordinates, **polyi** expects integer coordinates, and **polys** expects short integer coordinates. In addition, the **poly2** routines assume a 2-D point instead of a 3-D point.

There can be no more than 256 vertices in a polygon.

n |
Specifies the number of points in the polygon. |

parray |
Specifies an array containing the vertices of the polygon. |

The example C language program **tpbig.c** uses the **poly2i** subroutine to outline an ice cream cone in black.

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

/usr/include/gl/gl.h |
Contains C language constant and variable type definitions for GL. |

/usr/include/gl/fgl.h |
Contains FORTRAN constant and variable type definitions for GL. |

Allowing the system to draw concave polygons with the **concave** subroutine.

Specifying the next point in a polygon with the **pdr** subroutine.

Specifying the starting point for a polygon with the **pmv** subroutine.

Drawing a filled polygon with the **polf** subroutine.

Drawing a rectangle with the **rect** subroutine.

Drawing a filled rectangle with the **rectf** subroutine.

Drawing a relative polygon with the **rpdr** subroutine.

Moving the current graphics position to a starting point for a filled polygon relative to the current point with the **rpmv** subroutine.

AIX Graphics Library Overview, Setting Drawing Attributes, and Drawing Rectangles, Circles, Arcs, and Polygons.