private Rectangle integerise(Rectangle2D rect){
  int x0=(int)Math.ceil(rect.getMinX());
  int y0=(int)Math.ceil(rect.getMinY());
  int x1=(int)Math.floor(rect.getMaxX());
  int y1=(int)Math.floor(rect.getMaxY());
  return new Rectangle(x0,y0,(x1 - x0),(y1 - y0));
}

private Rectangle integerise ( Rectangle2D rect ) { int x0 = ( int ) Math . ceil ( rect . getMinX ( ) ) ; int y0 = ( int ) Math . ceil ( rect . getMinY ( ) ) ; int x1 = ( int ) Math . floor ( rect . getMaxX ( ) ) ; int y1 = ( int ) Math . floor ( rect . getMaxY ( ) ) ; return new Rectangle ( x0 , y0 , ( x1 - x0 ) , ( y1 - y0 ) ) ; }
trims a rectangle to integer coordinates .
