public class Polygon extends Shape
import javafx.scene.shape.*; Polygon polygon = new Polygon(); polygon.getPoints().addAll(new Double[]{ 0.0, 0.0, 20.0, 10.0, 10.0, 20.0 });
fillProperty, smoothProperty, strokeDashOffsetProperty, strokeLineCapProperty, strokeLineJoinProperty, strokeMiterLimitProperty, strokeProperty, strokeTypeProperty, strokeWidthProperty
Modifier and Type | Field and Description |
---|---|
private <any> |
points
Defines the coordinates of the polygon vertices.
|
private Path2D |
shape |
old_fill, old_stroke
Constructor and Description |
---|
Polygon()
Creates an empty instance of Polygon.
|
Polygon(double... points)
Creates a new instance of Polygon.
|
Modifier and Type | Method and Description |
---|---|
private BaseBounds |
doComputeGeomBounds(BaseBounds bounds,
BaseTransform tx) |
private Path2D |
doConfigShape() |
private NGNode |
doCreatePeer() |
private void |
doUpdatePeer() |
<any> |
getPoints()
Gets the coordinates of the
Polygon vertices. |
java.lang.String |
toString()
Returns a string representation of this
Polygon object. |
computeBounds, computeShapeBounds, computeShapeContains, convertLineJoin, fillProperty, getClassCssMetaData, getCssMetaData, getFill, getMode, getStroke, getStrokeDashArray, getStrokeDashOffset, getStrokeLineCap, getStrokeLineJoin, getStrokeMiterLimit, getStrokeType, getStrokeWidth, intersect, isSmooth, setFill, setMode, setShapeChangeListener, setSmooth, setStroke, setStrokeDashOffset, setStrokeLineCap, setStrokeLineJoin, setStrokeMiterLimit, setStrokeType, setStrokeWidth, smoothProperty, strokeDashOffsetProperty, strokeLineCapProperty, strokeLineJoinProperty, strokeMiterLimitProperty, strokeProperty, strokeTypeProperty, strokeWidthProperty, subtract, union
private final Path2D shape
private final <any> points
public Polygon()
public Polygon(double... points)
points
- the coordinates of the polygon verticespublic final <any> getPoints()
Polygon
vertices.Polygon
private NGNode doCreatePeer()
private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx)
private Path2D doConfigShape()
private void doUpdatePeer()
public java.lang.String toString()
Polygon
object.Polygon
object.