public static Area grow(final Shape s,final double offset,int join,float miterlimit){
  Area shape=new Area(s);
  if (MathUtils.almostEqual(offset,0.0,EPSILON)) {
    return shape;
  }
  Stroke stroke=new BasicStroke((float)Math.abs(2.0 * offset),BasicStroke.CAP_SQUARE,join,miterlimit);
  Area strokeShape=new Area(stroke.createStrokedShape(s));
  if (offset > 0.0) {
    shape.add(strokeShape);
  }
 else {
    shape.subtract(strokeShape);
  }
  return shape;
}

public static Area grow ( final Shape s , final double offset , int join , float miterlimit ) { Area shape = new Area ( s ) ; if ( MathUtils . almostEqual ( offset , 0.0 , EPSILON ) ) { return shape ; } Stroke stroke = new BasicStroke ( ( float ) Math . abs ( 2.0 * offset ) , BasicStroke . CAP_SQUARE , join , miterlimit ) ; Area strokeShape = new Area ( stroke . createStrokedShape ( s ) ) ; if ( offset > 0.0 ) { shape . add ( strokeShape ) ; } else { shape . subtract ( strokeShape ) ; } return shape ; }
expand or shrink a shape in all directions by a defined offset .
