question: public void filledPolygon ( double [ ] x , double [ ] y ) { int n = x . length ; GeneralPath path = new GeneralPath ( ) ; path . moveTo ( ( float ) scaleX ( x [ 0 ] ) , ( float ) scaleY ( y [ 0 ] ) ) ; for ( int i = 0 ; i < n ; i ++ ) path . lineTo ( ( float ) scaleX ( x [ i ] ) , ( float ) scaleY ( y [ i ] ) ) ; path . closePath ( ) ; offscreen . fill ( path ) ; draw ( ) ; }
target:  Draws a filled polygon with the given (x[i], y[i]) coordinates.