private boolean drawPolygon ( FeatureTileGraphics graphics , Area polygon , FeatureStyle featureStyle ) { Graphics2D polygonGraphics = graphics . getPolygonGraphics ( ) ; Paint fillPaint = getPolygonFillPaint ( featureStyle ) ; if ( fillPaint != null ) { polygonGraphics . setColor ( fillPaint . getColor ( ) ) ; polygonGraphics . fill ( polygon ) ; } Paint paint = getPolygonPaint ( featureStyle ) ; polygonGraphics . setColor ( paint . getColor ( ) ) ; polygonGraphics . setStroke ( paint . getStroke ( ) ) ; boolean drawn = polygonGraphics . hit ( new java . awt . Rectangle ( tileWidth , tileHeight ) , polygon , true ) ; if ( drawn ) { polygonGraphics . draw ( polygon ) ; } return drawn ; }
Draw the polygon