Java java.awt Polygon fields, constructors, methods, implement or subclass

Example usage for Java java.awt Polygon fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt Polygon.

The text is from its open source code.

Subclass

java.awt.Polygon has subclasses.
Click this link to see all its subclasses.

Constructor

Polygon(int[] xpoints, int[] ypoints, int npoints)
Constructs and initializes a Polygon from the specified parameters.
Polygon()
Creates an empty polygon.

Method

voidaddPoint(int x, int y)
Appends the specified coordinates to this Polygon .
booleancontains(int x, int y)
Determines whether the specified coordinates are inside this Polygon .
booleancontains(double x, double y)
booleancontains(Point p)
Determines whether the specified Point is inside this Polygon .
booleancontains(Point2D p)
booleancontains(Rectangle2D r)
RectanglegetBoundingBox()
Returns the bounds of this Polygon .
RectanglegetBounds()
Gets the bounding box of this Polygon .
PathIteratorgetPathIterator(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 .
booleanintersects(Rectangle2D r)
voidreset()
Resets this Polygon object to an empty polygon.
voidtranslate(int deltaX, int deltaY)
Translates the vertices of the Polygon by deltaX along the x axis and by deltaY along the y axis.