public static class Polygon.Rectangle extends Polygon implements java.io.Serializable
Polygon.PolygonHole, Polygon.PolygonIntersectStrategy, Polygon.PolygonUnionStrategy, Polygon.Rectangle
Constructor and Description |
---|
Polygon.Rectangle(int minX,
int minY,
int maxX,
int maxY) |
Polygon.Rectangle(Point min,
Point max)
Constructor to build a Rectangle from two points.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Edge> |
extractEdges() |
Point |
getMax()
Method to return the maximum X/Y in a Point.
|
Point |
getMin()
Method to return the minimum X/Y in a Point.
|
int |
height()
Method to return the height of this Polygon.
|
int[] |
toArray() |
java.lang.String |
toString() |
Polygon |
transformToPolygon() |
int |
width()
Method to return the width of this Polygon.
|
equals, getBoundingBox, hashCode
public Polygon.Rectangle(Point min, Point max)
min
- the minimum point values (lowest X/Y).max
- the maximum point values (highest X/Y).public Polygon.Rectangle(int minX, int minY, int maxX, int maxY)
public Point getMin()
public Point getMax()
public int width()
public int height()
public java.util.List<Edge> extractEdges()
extractEdges
in class Polygon
public Polygon transformToPolygon()
public int[] toArray()