To draw custom shapes we create a path, which consists of a series of coordinates between which the JavaFX platform should draw lines. Our resulting shape can be displayed either outlined or filled. Only one path can be defined at a time. Table 4.7 shows the methods we use to create and display a path.
|Return value||Method name and argument list|
sets the drawing path to empty
moveTo( double x, double y )
moves to the (x, y) location without adding a line to the path
lineTo( double x, double y )
adds a line to the current path from the previous location to (x, y)
closes the path by adding a line ...