Polygon Members

Polygon Members

Class Overview | This Package | All Packages

Fields
Name Description
bounds  
npoints The total number of points.
xpoints The array of x coordinates.
ypoints The array of y coordinates.

Constructors
Name Description
Polygon() Creates an empty polygon.
Polygon(int[], int[], int) Constructs and initializes a polygon from the specified parameters.

Methods
Name Description
addPoint(int, int) Appends a point to this polygon.
contains(int, int) Determines whether the specified point is contained by this polygon.
contains(Point) Determines whether the specified point is inside the Polygon.
getBoundingBox() Deprecated.
getBounds() Gets the bounding box of this polygon.
inside(int, int) Deprecated.
translate(int, int) Translates the vertices by deltaX along the x axis and by deltaY along the y axis.