public void drawFigure(Graphics2D g){
  AffineTransform savedTransform=null;
  if (get(TRANSFORM) != null) {
    savedTransform=g.getTransform();
    g.transform(get(TRANSFORM));
  }
  Paint paint=SVGAttributeKeys.getFillPaint(this);
  if (paint != null) {
    g.setPaint(paint);
    drawFill(g);
  }
  paint=SVGAttributeKeys.getStrokePaint(this);
  if (paint != null && get(STROKE_WIDTH) > 0) {
    g.setPaint(paint);
    g.setStroke(SVGAttributeKeys.getStroke(this));
    drawStroke(g);
  }
  if (get(TRANSFORM) != null) {
    g.setTransform(savedTransform);
  }
}

public void drawFigure ( Graphics2D g ) { AffineTransform savedTransform = null ; if ( get ( TRANSFORM ) != null ) { savedTransform = g . getTransform ( ) ; g . transform ( get ( TRANSFORM ) ) ; } Paint paint = SVGAttributeKeys . getFillPaint ( this ) ; if ( paint != null ) { g . setPaint ( paint ) ; drawFill ( g ) ; } paint = SVGAttributeKeys . getStrokePaint ( this ) ; if ( paint != null && get ( STROKE_WIDTH ) > 0 ) { g . setPaint ( paint ) ; g . setStroke ( SVGAttributeKeys . getStroke ( this ) ) ; drawStroke ( g ) ; } if ( get ( TRANSFORM ) != null ) { g . setTransform ( savedTransform ) ; } }
this method is invoked before the rendered image of the figure is composited .
