public void addPoint ( double x , double y ) { if ( npoints >= xpoints . length ) { final int newLength = npoints * 2 ; xpoints = Arrays . copyOf ( xpoints , newLength ) ; ypoints = Arrays . copyOf ( ypoints , newLength ) ; } xpoints [ npoints ] = x ; ypoints [ npoints ] = y ; npoints ++ ; updateBounds ( ) ; }
Add a point to the polygon .