Polygon

A polygon, each point of which can be animated independently.

Note: The pointCount property must be set before elements of the points property can be set.

Features

XML Element XML Type Java Class
primitive polygon uk.ac.ic.doc.scenebeans.Polygon

Properties

Name Type Default Value Getter Method Setter Method Description
filled boolean true isFilled setFilled Whether the polygon is drawn filled (true) or only as an outline (false).
pointCount int 0 getPointCount setPointCount The number of points in the polygon. The value of this property must be three or more.
points Point2D []
(indexed)
(0,0) getPoints setPoints The points of the polygon.
XCoord double []
(indexed)
0 getXCoord setXCoord The x coordinates of the points of the polygon.
YCoord double []
(indexed)
0 getYCoord setYCoord The x coordinates of the points of the polygon.

Example XML

<primitive type="polygon">
  <param name="pointCount" value="4"/>
  <param name="points" index="0" value="(0,0)"/>
  <param name="points" index="1" value="(-16,96)"/>
  <param name="points" index="2" value="(0,100)"/>
  <param name="points" index="3" value="(16,96)"/>
</primitive>