/** * Draw the specified geometry. * * @param geometry geometry to draw * @param symbol symbol for geometry * @param fillColor fill colour * @param strokeColor stroke colour * @param lineWidth line width * @param clipRect clipping rectangle */ public void drawGeometry(Geometry geometry, SymbolInfo symbol, Color fillColor, Color strokeColor, float lineWidth, float[] dashArray, Rectangle clipRect) { template.saveState(); // clipping code if (clipRect != null) { template.rectangle(clipRect.getLeft() + origX, clipRect.getBottom() + origY, clipRect.getWidth(), clipRect .getHeight()); template.clip(); template.newPath(); } setStroke(strokeColor, lineWidth, dashArray); setFill(fillColor); drawGeometry(geometry, symbol); template.restoreState(); }
clipRect.getHeight()); template.clip(); template.newPath();