public static Rectangle toSwtRectangle(final Rectangle2D rect2d){
  return new Rectangle((int)Math.round(rect2d.getMinX()),(int)Math.round(rect2d.getMinY()),(int)Math.round(rect2d.getWidth()),(int)Math.round(rect2d.getHeight()));
}

public static Rectangle toSwtRectangle ( final Rectangle2D rect2d ) { return new Rectangle ( ( int ) Math . round ( rect2d . getMinX ( ) ) , ( int ) Math . round ( rect2d . getMinY ( ) ) , ( int ) Math . round ( rect2d . getWidth ( ) ) , ( int ) Math . round ( rect2d . getHeight ( ) ) ) ; }
transform an awt rectangle2d instance into a swt one . the coordinates are rounded to integer for the swt object .
