Package org.locationtech.jts.awt
Class PolygonShape
java.lang.Object
org.locationtech.jts.awt.PolygonShape
- All Implemented Interfaces:
Shape
A
Shape
which represents a polygon which may contain holes.
Provided because the standard AWT Polygon class does not support holes.- Author:
- Martin Davis
-
Constructor Summary
ConstructorsConstructorDescriptionPolygonShape
(Coordinate[] shellVertices, Collection holeVerticesCollection) Creates a new polygonShape
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(double x, double y) boolean
contains
(double x, double y, double w, double h) boolean
boolean
getPathIterator
(AffineTransform at, double flatness) boolean
intersects
(double x, double y, double w, double h) boolean
-
Constructor Details
-
PolygonShape
Creates a new polygonShape
.- Parameters:
shellVertices
- the vertices of the shellholeVerticesCollection
- a collection of Coordinate[] for each hole
-
PolygonShape
public PolygonShape()
-
-
Method Details
-
getBounds
-
getBounds2D
- Specified by:
getBounds2D
in interfaceShape
-
contains
public boolean contains(double x, double y) -
contains
-
intersects
public boolean intersects(double x, double y, double w, double h) - Specified by:
intersects
in interfaceShape
-
intersects
- Specified by:
intersects
in interfaceShape
-
contains
public boolean contains(double x, double y, double w, double h) -
contains
-
getPathIterator
- Specified by:
getPathIterator
in interfaceShape
-
getPathIterator
- Specified by:
getPathIterator
in interfaceShape
-