Represents a line in two-dimensional space. This class includes a draw() method for convenience when drawing lines on a canvas.
new Line2D(num x0, num y0, num x1, num y1) #
Creates a new Line2D instance from ( x0, y0) to ( x1, y1).
num x0 #
The x-coordinate of the starting point.
num x1 #
The x-coordinate of the ending point.
num y0 #
The y-coordinate of the starting point.
num y1 #
The y-coordinate of the ending point.