Generated Object
javafx.scene.shape.Polygon
Attributes
This node takes the attributes from the javafx.scene.shape.Polygon class. see javafx.scene.shape.Polygon.
Content
This node does not take any content.
Usage
Create a Polygon shape
Examples
| Code Block |
|---|
import groovyx.javafx.GroovyFX
import groovyx.javafx.SceneGraphBuilder
GroovyFX.start({
def sg = new SceneGraphBuilder();
sg.stage(
title: "Polygon Example (Groovy)",
width: 200, height:200,
visible: true,
){
scene (fill: white) {
polygon(
points: [ 0, -10, 10, 10, -10, 10, 0, -10],
translateX: 100, translateY: 100,
fill: red)
}
}
});
|