public void limit(double x1,double y1,double x2,double y2){
  clip[0]=Math.max(clip[0],x1);
  clip[1]=Math.max(clip[1],y1);
  clip[6]=Math.min(clip[6],x2);
  clip[7]=Math.min(clip[7],y2);
}

public void limit ( double x1 , double y1 , double x2 , double y2 ) { clip [ 0 ] = Math . max ( clip [ 0 ] , x1 ) ; clip [ 1 ] = Math . max ( clip [ 1 ] , y1 ) ; clip [ 6 ] = Math . min ( clip [ 6 ] , x2 ) ; clip [ 7 ] = Math . min ( clip [ 7 ] , y2 ) ; }
limit the clip such that it fits within the specified region .
