public void intersection(double x,double y,double w,double h){
  if (status == INVALID)   return;
  if (status == EMPTY) {
    setClip(x,y,w,h);
    status=INUSE;
    return;
  }
  clip[0]=Math.max(clip[0],x);
  clip[1]=Math.max(clip[1],y);
  clip[6]=Math.min(clip[6],x + w);
  clip[7]=Math.min(clip[7],y + h);
}

public void intersection ( double x , double y , double w , double h ) { if ( status == INVALID ) return ; if ( status == EMPTY ) { setClip ( x , y , w , h ) ; status = INUSE ; return ; } clip [ 0 ] = Math . max ( clip [ 0 ] , x ) ; clip [ 1 ] = Math . max ( clip [ 1 ] , y ) ; clip [ 6 ] = Math . min ( clip [ 6 ] , x + w ) ; clip [ 7 ] = Math . min ( clip [ 7 ] , y + h ) ; }
intersect this clip with another region . as a result , this clip will become the intersecting area of the two regions .
