public class Rectangle extends PointShape
Modifier and Type | Field and Description |
---|---|
private double[] |
bl
The bottom left corner of the rectangle
|
private double[] |
br
The bottom right corner of the rectangle
|
private double[] |
tl
The top left corner of the rectangle
|
private double[] |
tr
The top right corner of the rectangle
|
center
Constructor and Description |
---|
Rectangle(Paint paint,
double[] tl,
double[] br)
Create a Rectangle
|
Modifier and Type | Method and Description |
---|---|
void |
fill(javafx.scene.canvas.GraphicsContext graphics)
Fill the inner portion of this shape
|
double[][] |
getPoints() |
private double[] tl
private double[] tr
private double[] bl
private double[] br
public Rectangle(Paint paint, double[] tl, double[] br)
paint
- the main class of the programtl
- the top left corner of the rectanglebr
- the bottom right corner of the rectanglepublic double[][] getPoints()
getPoints
in class PointShape
public void fill(javafx.scene.canvas.GraphicsContext graphics)
PointShape
fill
in class PointShape
graphics
- the GraphicsContext onto which the shape is being drawn