Notes:
A TNTGenPolygon opens the door for non-regular shapes composed of segments. To do this, it needs an 'array' of TNTPoints which form the vertices (corners) of the shape, and of course, a TNTColor for fill color (fcolr) and a TNTStroke for borders. There is the ability of rotation as well. Corner points may be shown or hidden using the 'showPoints' boolean property.
Features and Usage:
| Primary Attributes: |
4 parameters: The array of points must begin and end with the same point (to finish the curve); Unless you want the curve to cross in on itself, you must traverse the shape clockwise or counterclockwise |
|---|---|
| To Create:(Example above) |
var ptA = new TNTPoint(1, 1); |
| To Draw: |
myPoly.drawTNTGenPolygon(context); |
| Comments: | Note that the rotation is about the origin of the coordinate system. Generally, it's easier to draw these critters without a rotation, at least originally. |
| Even More: | When making the points, start at a vertex and create future ones in either a clockwise or counter-clockwise fashion. If you hop around, the image will get 'twisted' . Also, be sure to make the last point the same as the first to close the figure. |
