public static Rectangle2D rectangleByRadius(Rectangle2D rect,double radiusW,double radiusH){
  ParamChecks.nullNotPermitted(rect,"rect");
  double x=rect.getCenterX();
  double y=rect.getCenterY();
  double w=rect.getWidth() * radiusW;
  double h=rect.getHeight() * radiusH;
  return new Rectangle2D.Double(x - w / 2.0,y - h / 2.0,w,h);
}

public static Rectangle2D rectangleByRadius ( Rectangle2D rect , double radiusW , double radiusH ) { ParamChecks . nullNotPermitted ( rect , "rect" ) ; double x = rect . getCenterX ( ) ; double y = rect . getCenterY ( ) ; double w = rect . getWidth ( ) * radiusW ; double h = rect . getHeight ( ) * radiusH ; return new Rectangle2D . Double ( x - w / 2.0 , y - h / 2.0 , w , h ) ; }
a utility method that computes a rectangle using relative radius values .
