JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

Profile: desktop, common

Overview

The RegularPolygon class defines a poligon that is centered and each side has the same length.

the code:

import org.jfxtras.scene.shape.RegularPolygon;
    import javafx.scene.paint.*;

    RegularPolygon {
        angle: 0
        centerX: 50
        centerY: 50
        radius: 40
        sides: 6
        fill: Color.BLACK
    }

produces:

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicangleNumber0.0

Defines the rotation angle of the polygon in degrees.

publiccenterXNumber0.0

Defines the horizontal position of the center of the polygon in pixels.

publiccenterYNumber0.0

Defines the vertical position of the center of the polygon in pixels.

publicradiusNumber30

Defines the radius of the polygon in pixels.

publicsidesNumber5

Defines the number of sides of the polygon.

Inherited Variables

Inherited Functions