public class NGon extends PointShape
Modifier and Type | Field and Description |
---|---|
private double[] |
br
The bottom right corner of the shape
|
private static int |
n
The number of sides to draw
|
private double[] |
tl
The top left corner of the shape
|
center
Constructor and Description |
---|
NGon(double[] tl,
double[] br)
Create an NGon
|
Modifier and Type | Method and Description |
---|---|
void |
fill(javafx.scene.canvas.GraphicsContext graphics)
Fill the inner portion of this shape
|
double[][] |
getPoints() |
static void |
setN(int n)
Updates the number of sides to be drawn by the shape
|
private static int n
private double[] tl
private double[] br
public NGon(double[] tl, double[] br)
tl
- the top left corner of the shapebr
- the bottom right corner of the shapepublic 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 drawnpublic static void setN(int n)
n
- the number of sides to draw