@SuppressWarnings("nls") private void writeUnclippedShape(Shape s){
  if (s instanceof Line2D) {
    Line2D l=(Line2D)s;
    double x1=l.getX1();
    double y1=l.getY1();
    double x2=l.getX2();
    double y2=l.getY2();
    write("<line x1=\"",x1,"\" y1=\"",y1,"\" x2=\"",x2,"\" y2=\"",y2,"\" ");
  }
 else   if (s instanceof Rectangle2D) {
    Rectangle2D r=(Rectangle2D)s;
    double x=r.getX();
    double y=r.getY();
    double width=r.getWidth();
    double height=r.getHeight();
    write("<rect x=\"",x,"\" y=\"",y,"\" width=\"",width,"\" height=\"",height,"\" ");
  }
 else   if (s instanceof RoundRectangle2D) {
    RoundRectangle2D r=(RoundRectangle2D)s;
    double x=r.getX();
    double y=r.getY();
    double width=r.getWidth();
    double height=r.getHeight();
    double arcWidth=r.getArcWidth();
    double arcHeight=r.getArcHeight();
    write("<rect x=\"",x,"\" y=\"",y,"\" width=\"",width,"\" height=\"",height,"\" rx=\"",arcWidth,"\" ry=\"",arcHeight,"\" ");
  }
 else   if (s instanceof Ellipse2D) {
    Ellipse2D e=(Ellipse2D)s;
    double x=e.getX();
    double y=e.getY();
    double rx=e.getWidth() / 2.0;
    double ry=e.getHeight() / 2.0;
    write("<ellipse cx=\"",x + rx,"\" cy=\"",y + ry,"\" rx=\"",rx,"\" ry=\"",ry,"\" ");
  }
 else {
    write("<path d=\"");
    writePath(s);
    write("\" ");
  }
}

@ SuppressWarnings ( "nls" ) private void writeUnclippedShape ( Shape s ) { if ( s instanceof Line2D ) { Line2D l = ( Line2D ) s ; double x1 = l . getX1 ( ) ; double y1 = l . getY1 ( ) ; double x2 = l . getX2 ( ) ; double y2 = l . getY2 ( ) ; write ( "<line x1=\"" , x1 , "\" y1=\"" , y1 , "\" x2=\"" , x2 , "\" y2=\"" , y2 , "\" " ) ; } else if ( s instanceof Rectangle2D ) { Rectangle2D r = ( Rectangle2D ) s ; double x = r . getX ( ) ; double y = r . getY ( ) ; double width = r . getWidth ( ) ; double height = r . getHeight ( ) ; write ( "<rect x=\"" , x , "\" y=\"" , y , "\" width=\"" , width , "\" height=\"" , height , "\" " ) ; } else if ( s instanceof RoundRectangle2D ) { RoundRectangle2D r = ( RoundRectangle2D ) s ; double x = r . getX ( ) ; double y = r . getY ( ) ; double width = r . getWidth ( ) ; double height = r . getHeight ( ) ; double arcWidth = r . getArcWidth ( ) ; double arcHeight = r . getArcHeight ( ) ; write ( "<rect x=\"" , x , "\" y=\"" , y , "\" width=\"" , width , "\" height=\"" , height , "\" rx=\"" , arcWidth , "\" ry=\"" , arcHeight , "\" " ) ; } else if ( s instanceof Ellipse2D ) { Ellipse2D e = ( Ellipse2D ) s ; double x = e . getX ( ) ; double y = e . getY ( ) ; double rx = e . getWidth ( ) / 2.0 ; double ry = e . getHeight ( ) / 2.0 ; write ( "<ellipse cx=\"" , x + rx , "\" cy=\"" , y + ry , "\" rx=\"" , rx , "\" ry=\"" , ry , "\" " ) ; } else { write ( "<path d=\"" ) ; writePath ( s ) ; write ( "\" " ) ; } }
writes the specified shape without clipping path information .
