JavaFX Quad Curve

Quad curve is a plain curve of order two. This is different from Cubic Curve in the sense that it doesn't have two control points like cubic curve. It rather has a single control point (X,Y).

In JavaFX, we can instantiate javafx.scene.shape.QuadCurve class to create a Quad curve. The class contains various properties which are defined in the table below. The class also contains the setter methods which can be used to set the properties to get the quad curve according to our requirements.

Properties

The properties of the class along with their setter methods are given in the table below.

PropertyDescriptionSetter Method
controlXX coordinate of the control point of quad curvesetControlX(Double)
controlYY coordinate of the control point of quad curvesetControlY(Double)
endXX coordinate of the end point of quad curvesetEndX(Double)
endYY coordinate of ending point of quad curvesetEndY(Double)
startXX coordinate of starting point of quad curvesetStartX(Double)
startYY coordinate of starting point of quad curvesetStartY(Double)

Example


JavaFX Quad Curve Output
Next TopicJavaFX Color