Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Generated Object

javafx.scene.shape.Line

Attributes

This node takes the attributes from the javafx.scene.shape.Line class. see javafx.scene.shape.Line.

Content

This node does not take any content.

Usage

Create a Line shape

Examples

Code Block
import groovyx.javafx.GroovyFX
import groovyx.javafx.SceneGraphBuilder

GroovyFX.start({
    def sg = new SceneGraphBuilder();

    sg.stage(
        title: "Line Example (Groovy)",
        width: 200, height:200,
        visible: true,
    ){ 
        scene (fill: white) {
            line(startX: 10, startY: 10,
                endX: 150, endY: 150,
                stroke: red, strokeWidth: 2)
        }
    }
});