Example usage for Java java.awt Polygon fields, constructors, methods, implement or subclass
The text is from its open source code.
Polygon(int[] xpoints, int[] ypoints, int npoints) Constructs and initializes a Polygon from the specified parameters. | |
Polygon() Creates an empty polygon. |
void | addPoint(int x, int y) Appends the specified coordinates to this Polygon . |
boolean | contains(int x, int y) Determines whether the specified coordinates are inside this Polygon . |
boolean | contains(double x, double y) |
boolean | contains(Point p) Determines whether the specified Point is inside this Polygon . |
boolean | contains(Point2D p) |
boolean | contains(Rectangle2D r) |
Rectangle | getBoundingBox() Returns the bounds of this Polygon . |
Rectangle | getBounds() Gets the bounding box of this Polygon . |
PathIterator | getPathIterator(AffineTransform at) Returns an iterator object that iterates along the boundary of this Polygon and provides access to the geometry of the outline of this Polygon . |
boolean | intersects(Rectangle2D r) |
void | reset() Resets this Polygon object to an empty polygon. |
void | translate(int deltaX, int deltaY) Translates the vertices of the Polygon by deltaX along the x axis and by deltaY along the y axis. |