function gPolygon( /* int[] */ xpoints, /* int[] */ ypoints, /* int[] */ npoints) { // implements Shape
        var argv = gPolygon.arguments;
        var argc = gPolygon.length;
        this.className = "gPolygon";

        // The total number of points.  The value of npoints represents the number of 
        // valid points in this gPolygon and might be less than the number of elements in 
        // xpoints ypoints
        /* int */
        this.npoints = 0;
        // The array of x coordinates.  The number of elements in this array might be 
        // more than the number of x coordinates in this gPolygon.  The extra elements 
        // allow new points to be added to this gPolygon without re-creating this array.
        /* int[] */
        this.xpoints = null;
        // The array of y coordinates.  The number of elements in this array might be 
        // more than the number of y coordinates in this gPolygon.  The extra elements 
        // allow new points to be added to this gPolygon without re-creating this array.
        /* int[] */
        this.ypoints = null;
        /* gRectangle */
        this.bounds = null;
        
        if (argv.length == 1) 
        	this.initgPolygon();
        else
        if (argv.length > 0) 
        	this.initgPolygon(xpoints, ypoints, npoints);

    }
/**
 * Class gPolygon
 * The gPolygon class encapsulates a description of a closed, two-dimensional 
 * region within a coordinate space. This region is bounded by an arbitrary 
 * number of line segments, each of which is one side of the polygon. 
 * Internally, a polygon comprises of a list of x, y coordinate pairs, where each
 * pair defines a vertex of the polygon, and two successive pairs are the 
 * endpoints of a line that is a side of the polygon. The first and final
 * pairs of x, y points are joined by a line segment that closes the polygon.  
 * This gPolygon is defined with an even-odd winding rule.  
 * See {@link java.awt.geom.PathIterator#WIND_EVEN_ODD WIND_EVEN_ODD}
 *
 *
 * New: 
 * (1) Smooth() function that take smoothness level to smooth the polygon by using the averge method
 * (2) decimationPath() function for tessellating the curve of a path to a polygon
 * 
 */
Class gPolygon
The gPolygon class encapsulates a description of a closed, two-dimensional
region within a coordinate space. This region is bounded by an arbitrary
number of line segments, each of which is one side of the polygon.
Internally, a polygon comprises of a list of x, y coordinate pairs, where each
pair defines a vertex of the polygon, and two successive pairs are the
endpoints of a line that is a side of the polygon. The first and final
pairs of x, y points are joined by a line segment that closes the polygon.
This gPolygon is defined with an even-odd winding rule.

(1) Smooth() function that take smoothness level to smooth the polygon by using the averge method
(2) decimationPath() function for tessellating the curve of a path to a polygon
Class gPolygon The gPolygon class encapsulates a description of a closed two - dimensional region within a coordinate space . This region is bounded by an arbitrary number of line segments each of which is one side of the polygon . Internally a polygon comprises of a list of x y coordinate pairs where each pair defines a vertex of the polygon and two successive pairs are the endpoints of a line that is a side of the polygon . The first and final pairs of x y points are joined by a line segment that closes the polygon . This gPolygon is defined with an even - odd winding rule . ( 1 ) Smooth () function that take smoothness level to smooth the polygon by using the averge method ( 2 ) decimationPath () function for tessellating the curve of a path to a polygon
function gPolygon(  xpoints,  ypoints,  npoints) { 
        var argv = gPolygon.arguments;
        var argc = gPolygon.length;
        this.className = "gPolygon";
        this.npoints = 0;
        this.xpoints = null;
        this.ypoints = null;
        this.bounds = null;
        if (argv.length == 1) 
        	this.initgPolygon();
        else
        if (argv.length > 0) 
        	this.initgPolygon(xpoints, ypoints, npoints);
    }
function gPolygon ( xpoints , ypoints , npoints ) { var argv = gPolygon . arguments ; var argc = gPolygon . length ; this . className = "gPolygon" ; this . npoints = 0 ; this . xpoints = null ; this . ypoints = null ; this . bounds = null ; if ( argv . length == 1 ) this . initgPolygon ( ) ; else if ( argv . length > 0 ) this . initgPolygon ( xpoints , ypoints , npoints ) ; }
Class gPolygon
 The gPolygon class encapsulates a description of a closed, two-dimensional
 region within a coordinate space.
Class gPolygon The gPolygon class encapsulates a description of a closed two - dimensional region within a coordinate space .
/* int[] */ /* int[] */ /* int[] */ // implements Shape
 // The total number of points.  The value of npoints represents the number of 
 // valid points in this gPolygon and might be less than the number of elements in 
 // xpoints ypoints
 /* int */ // The array of x coordinates.  The number of elements in this array might be 
 // more than the number of x coordinates in this gPolygon.  The extra elements 
 // allow new points to be added to this gPolygon without re-creating this array.
 /* int[] */ // The array of y coordinates.  The number of elements in this array might be 
 // more than the number of y coordinates in this gPolygon.  The extra elements 
 // allow new points to be added to this gPolygon without re-creating this array.
 /* int[] */ /* gRectangle */