public void clip(Shape s){
  Shape ts=transformShape(s);
  if (userClip != null) {
    if (ts != null) {
      userClip.intersect(new Area(ts));
    }
 else {
      userClip=null;
    }
  }
 else {
    userClip=(ts != null) ? new Area(ts) : null;
  }
  try {
    writeClip(s);
  }
 catch (  IOException e) {
    handleException(e);
  }
}

public void clip ( Shape s ) { Shape ts = transformShape ( s ) ; if ( userClip != null ) { if ( ts != null ) { userClip . intersect ( new Area ( ts ) ) ; } else { userClip = null ; } } else { userClip = ( ts != null ) ? new Area ( ts ) : null ; } try { writeClip ( s ) ; } catch ( IOException e ) { handleException ( e ) ; } }
clips using given shape . dispatches to writeclip ( rectangle ) , writeclip ( rectangle2d ) or writeclip ( shape ) .
