Home » JavaFX Cubic Curve

JavaFX Cubic Curve

by Online Tutorials Library

JavaFX Cubic Curve

In general, cubic curve is a curve of order 3. In JavaFX, we can create cubic curve by just instantiating javafx.scene.shape.CubicCurve class. The class contains various properties defined in the table along with the setter methods. These properties needs to be set in order to create the cubic curve as required.

Properties

The properties of Cubic Curve class have the following properties.

Property Description Setter method
controlX1 X coordinate of first control point of cubic curve. setControlX1(Double)
controlX2 X coordinate of second control point of cubic curve setControlX2(Double)
controlY1 Y coordinate of first control point of cubic curve setControlY1(Double)
controlY2 Y coordinate of second control point of cubic curve setControlX1(Double)
endX X coordinate of end point of cubic curve setEndX(Double)
endY Y coordinate of end point of cubic curve. setEndY(Double)
startX X coordinate of starting point of cubic curve setStartX(Double)
startY Y coordinate of starting point of cubic curve setStartY(Double)

Example:

JavaFX Cubic Curve Output

Next TopicJavaFX Quad Curve

You may also like