Package nl.saxion.app.canvas.drawable
Class Polygon
java.lang.Object
nl.saxion.app.canvas.CanvasElement
nl.saxion.app.canvas.drawable.DrawableElement
nl.saxion.app.canvas.drawable.Polygon
Polygon is a drawable element, without an x and y coordinate.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPoint
(int x, int y) Add a point to the polygonvoid
draw
(Graphics2D g) int
Get a list with all points in the polygonboolean
boolean
hasFill()
void
void
setFillColor
(Color fillColor)
-
Constructor Details
-
Polygon
public Polygon()
-
-
Method Details
-
addPoint
public void addPoint(int x, int y) Add a point to the polygon- Parameters:
x
- X-coordinatey
- Y-coordinate
-
getPoints
Get a list with all points in the polygon- Returns:
- List with all points
-
draw
- Specified by:
draw
in classCanvasElement
-
getBorderSize
public int getBorderSize() -
getFillColor
-
hasBorder
public boolean hasBorder() -
hasFill
public boolean hasFill() -
setFillColor
-
setBorder
-