Curves

Arc is a piece of the ellipse. It has the extra startAngle and length properties compared to Ellipse. Both these parameters are measured in degrees, ranging from 0 to 360.

The following is an example of an ellipse and a similar arc with a length of 180 degrees:

// chapter2/shapes/ArcAndEllipse.javaEllipse ellipse = new Ellipse();ellipse.setRadiusX(60);ellipse.setRadiusY(40);ellipse.setFill(Color.DARKGREY);Arc arc = new Arc();arc.setRadiusX(60);arc.setRadiusY(40);arc.setFill(Color.DARKGREY);arc.setStartAngle(45);arc.setLength(180);

QuadCurve and CubicCurve represent quadratic and cubic Bezier parametric curves. This is a popular method ...

Get Mastering JavaFX 10 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.