public static Rectangle2D newOrthoRegion(Rectangle2D from){
  double width=from.getWidth();
  double height=from.getHeight();
  if ((width < ZERO_THRESHOLD) && (height < ZERO_THRESHOLD)) {
    width=1.0;
    height=1.0;
  }
  width=Math.max(width,height);
  height=Math.max(width,height);
  double x=from.getX() - (width - from.getWidth()) / 2;
  double y=from.getY() - (height - from.getHeight()) / 2;
  return new Rectangle2D.Double(x,y,width,height);
}

public static Rectangle2D newOrthoRegion ( Rectangle2D from ) { double width = from . getWidth ( ) ; double height = from . getHeight ( ) ; if ( ( width < ZERO_THRESHOLD ) && ( height < ZERO_THRESHOLD ) ) { width = 1.0 ; height = 1.0 ; } width = Math . max ( width , height ) ; height = Math . max ( width , height ) ; double x = from . getX ( ) - ( width - from . getWidth ( ) ) / 2 ; double y = from . getY ( ) - ( height - from . getHeight ( ) ) / 2 ; return new Rectangle2D . Double ( x , y , width , height ) ; }
provide a square region that is centered on the supplied from region , and is a minimal cover for the from region . the provided region is at least ( 1 . 0 , 1 . 0 ) , even if the from region is empty .
