public static void expand(Rectangle2D r,double amount){
  r.setRect(r.getX() - amount,r.getY() - amount,r.getWidth() + 2 * amount,r.getHeight() + 2 * amount);
}

public static void expand ( Rectangle2D r , double amount ) { r . setRect ( r . getX ( ) - amount , r . getY ( ) - amount , r . getWidth ( ) + 2 * amount , r . getHeight ( ) + 2 * amount ) ; }
expand a rectangle by the given amount .
