public static Dimension rectangleDoubleToDimension ( final Rectangle2D . Double rectangle ) { return new Dimension ( ( int ) Math . round ( rectangle . width ) , ( int ) Math . round ( rectangle . height ) ) ; }
Round the size of a rectangle with double values .