Open Source JavaFX Now!

JFXtras Core Logo

Triangle

Provides a Triangle shapes (Equilateral, Isosceles and Right) as below:

Try it out

If you would like to try a sample of how this shape operates, run the ShapesDemoFX.fx application in org.jfxtras.scene.shape.

Sample Code


ETriangle { x: 260, y: 90, width: 80 rotate: 90 fill: Color.RED stroke: Color.BLACK } ITriangle { x: 20, y: 190, width: 80 rotate: 0 height: 30 fill: Color.BLUE stroke: Color.BLACK } RTriangle { x: 20, y: 300, width: 80 rotate: 0 height: 30 anglePosition: RTriangle.ANGLE_AT_END fill: Color.ORANGE stroke: Color.BLACK }

General Options

(see JavaFXDoc for details)

Parameter   Default   Description
x0x coordinate of the Triangles lower left point
y0y coordinate of the Triangles lower left point
width80width of the Triangle base (E. I and R)
height40Height of the Triangle (I and R)
anglePositionPosition of right angle (R) - NONE, ANGLE_AT_START, ANGLE_AT_END.


Other options may be available, including public variables and methods and will be detailed in the JavaFXDoc

<< Back to JFXtras FrontPage < Back to Shapes
1 Attachments 1 Attachments
398 Views