public static Envelope scaleToWidth ( Envelope original , double newWidth ) { double width = original . getWidth ( ) ; double factor = newWidth / width ; double newHeight = original . getHeight ( ) * factor ; return new Envelope ( original . getMinX ( ) , original . getMinX ( ) + newWidth , original . getMinY ( ) , original . getMinY ( ) + newHeight ) ; }
Scale an envelope to have a given width .