public class PolygonShape
extends java.lang.Object
implements java.awt.Shape
Constructor and Description |
---|
PolygonShape() |
PolygonShape(com.vividsolutions.jts.geom.Coordinate[] shellVertices,
java.util.Collection holeVerticesCollection) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double x,
double y) |
boolean |
contains(double x,
double y,
double w,
double h) |
boolean |
contains(java.awt.geom.Point2D p) |
boolean |
contains(java.awt.geom.Rectangle2D r) |
java.awt.Rectangle |
getBounds() |
java.awt.geom.Rectangle2D |
getBounds2D() |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at) |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at,
double flatness) |
boolean |
intersects(double x,
double y,
double w,
double h) |
boolean |
intersects(java.awt.geom.Rectangle2D r) |
java.awt.geom.GeneralPath |
toPolygon(com.vividsolutions.jts.geom.Coordinate[] coordinates) |
public PolygonShape()
public PolygonShape(com.vividsolutions.jts.geom.Coordinate[] shellVertices, java.util.Collection holeVerticesCollection)
shellVertices
- in view coordinatesholeVerticesCollection
- a Coordinate[] for each hole, in view coordinatespublic final java.awt.geom.GeneralPath toPolygon(com.vividsolutions.jts.geom.Coordinate[] coordinates)
public java.awt.Rectangle getBounds()
getBounds
in interface java.awt.Shape
public java.awt.geom.Rectangle2D getBounds2D()
getBounds2D
in interface java.awt.Shape
public boolean contains(double x, double y)
contains
in interface java.awt.Shape
public boolean contains(java.awt.geom.Point2D p)
contains
in interface java.awt.Shape
public boolean intersects(double x, double y, double w, double h)
intersects
in interface java.awt.Shape
public boolean intersects(java.awt.geom.Rectangle2D r)
intersects
in interface java.awt.Shape
public boolean contains(double x, double y, double w, double h)
contains
in interface java.awt.Shape
public boolean contains(java.awt.geom.Rectangle2D r)
contains
in interface java.awt.Shape
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
getPathIterator
in interface java.awt.Shape
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
getPathIterator
in interface java.awt.Shape