public static Bbox buffer ( Bbox bbox , double range ) { if ( range >= 0 ) { double r2 = range * 2 ; return new Bbox ( bbox . getX ( ) - range , bbox . getY ( ) - range , bbox . getWidth ( ) + r2 , bbox . getHeight ( ) + r2 ) ; } throw new IllegalArgumentException ( "Buffer range must always be positive." ) ; }
Return a new bounding box that has increased in size by adding a range to a given bounding box .