code: public Bbox createFittingBox(double ratioWidth, double ratioHeight) {
  		if (ratioWidth > 0 && ratioHeight > 0) {
  			double newRatio = ratioWidth / ratioHeight;
  			double oldRatio = width / height;
  			double newWidth = width;
  			double newHeight = height;
  			if (newRatio > oldRatio) {
  				newHeight = width / newRatio;
  			} else {
  				newWidth = height * newRatio;
  			}
  			Bbox result = new Bbox(0, 0, newWidth, newHeight);
  			result.setCenterPoint(getCenterPoint());
  			return result;
  		} else {
  			return new Bbox(this);
  		}
  	}
docs: Creates a bbox that fits exactly in this box but has a different width/height ratio.
  
  @param ratioWidth width dor ratio
  @param ratioHeight height for ratio
  @return bbox