Polygon.Polygon

Polygon.Polygon

Class Overview | Class Members | This Package | All Packages

Syntax 1
public Polygon()
Description
Creates an empty polygon.



Syntax 2
public Polygon( int xpoints[], int ypoints[], int npoints )
Parameters
xpoints
an array of x coordinates.
ypoints
an array of y coordinates.
npoints
the total number of points in the polygon.
Description
Constructs and initializes a polygon from the specified parameters.

Exceptions
NegativeArraySizeException if the value of npoints is negative.