HTBasic Help
×
Menu
Index

POLYGON

Draws a closed regular polygon, circle, or ellipse.
 
 POLYGON radius [,total-chords [,draw-chords]] [,FILL] [,EDGE]
 
Usage:
POLYGON Radius,Totside,Drawside
POLYGON -Figure,7,FILL,EDGE
POLYGON 30,65,50
 
Example:           POLYGON.BAS
 
Description:
POLYGON generates polygons or circles with a specified number of chords. The pen starts and ends a POLYGON execution in the same position and after execution the pen is up. The radius is the distance between the logical pen position and the polygon vertices where the first vertex is in the positive X axis direction. A negative radius will rotate the POLYGON 180 degrees.
 
The total number of chords is rounded to an integer and must be in the range 3 to 32,767. If not specified, sixty chords are drawn.
 
The optional number of chords to draw is rounded to an integer and must be in the range of one to 32,767. If not specified all chords are drawn.
If the number of chords drawn are less than the specified total number of chords, the polygon closure is affected. If the pen is up when the POLYGON statement is executed, the polygon is closed by drawing the last vertex to the first vertex. If pen is down, the polygon is closed by drawing the last vertex to the center of the polygon and then drawing from the center to the first vertex.
 
The polygon can be filled with the current AREA color and edged with the current PEN color and LINE TYPE. If neither are specified EDGE is assumed.
 
POLYGON is affected by PIVOT.
 
See Also: