Scale an envelope to have a given width.

@param original the envelope.
@param newWidth the new width to use.
@return the scaled envelope placed in the original lower left corner position.
961070
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);
    }
1188307
@Override
	public Planar<T> createNew(int imgWidth, int imgHeight) {
		return new Planar<>(type, imgWidth, imgHeight, bands.length);
	}
405994
public float adjustWidth(float width) {
    // Canvas.measureText does not account for the extra width consumed by italic characters, so we
    // fudge in a fraction of an em and hope the font isn't too slanted
    switch (font.style) {
    case ITALIC:      return width + emwidth/8;
    case BOLD_ITALIC: return width + emwidth/6;
    default:          return width; // nada
    }
  }
916792
public void setWidth(int width) {

        if (width <= 0) {
            m_containerElement.getStyle().clearWidth();
            m_width = -1;
        } else {
            m_containerElement.getStyle().setWidth(width, Unit.PX);
            m_width = width;
        }
    }
1311809
function(newWidth, newHeight) {
          var requiresRefresh = self.dataLength && newWidth && newHeight &&
            (newWidth !== self.width || newHeight !== self.height);

          self.width = newWidth;
          self.height = newHeight;

          return !!requiresRefresh;
        }
1068682
protected void stretch(int newWidth, int newHeight)
    {
        width = newWidth;
        height = newHeight;
        surface = Graphics.resize(surfaceOriginal, newWidth, newHeight);
    }
534882
public void setSize(int newWidth, int newHeight) {
		saveState();
		Bbox bbox = getBounds();
		if (width != newWidth || height != newHeight) {
			this.width = newWidth;
			this.height = newHeight;
			if (viewState.getScale() < getMinimumScale()) {
				// The new scale is too low, re-apply old values:
				double scale = getBestScale(bbox);
				doSetScale(snapToResolution(scale, ZoomOption.LEVEL_FIT));
			}
			// Use the same center point for the new bounds
			doSetOrigin(bbox.getCenterPoint());
			fireEvent(true, null);
		}
	}
1347582
private void setWidth(int width) {
        contentParams.width = options.fullScreenPeek() ? screenWidth : width;
        content.setLayoutParams(contentParams);
    }
745098
public Envelope convertEnvelopeFromWgsToEnu( Envelope envelopeWgs ) {
        Polygon polygonEnu = GeometryUtilities.createPolygonFromEnvelope(envelopeWgs);
        convertGeometryFromWgsToEnu(polygonEnu);
        Envelope envelopeEnu = polygonEnu.getEnvelopeInternal();
        return envelopeEnu;
    }
485702
public function withWidth($newWidth)
    {
        return $this->withSize($newWidth, ceil($newWidth * $this->height / $this->width));
    }
203716
public function resizeExactWidth(&$image, $newWidth)
    {

        $width  = $image->getWidth();
        $height = $image->getHeight();
        $ratio  = $width / $height;

        $resizeWidth  = $newWidth;
        $resizeHeight = round($newWidth / $ratio);

        $this->_resize($image, $resizeWidth, $resizeHeight);

        return $this;
    }
597845
public final void setBorderWidth(int unit,
                                     int size) {
        if (size < 0) {
            throw new IllegalArgumentException("Border width cannot be less than zero.");
        }

        int scaledSize = (int) TypedValue.applyDimension(unit, size, getResources().getDisplayMetrics());
        setBorderInternal(scaledSize, mBorderColor, true);
    }
938007
@NonNull
    public IconicsDrawable sizeResY(@DimenRes int sizeResId) {
        return sizePxY(mContext.getResources().getDimensionPixelSize(sizeResId));
    }
219836
@NonNull
    public IconicsDrawable sizePxX(@Dimension(unit = PX) int sizePx) {
        mSizeX = sizePx;
        setBounds(0, 0, mSizeX, mSizeY);

        invalidateSelf();
        return this;
    }
464383
function getWidth(el, defaultValue) {
    var width = this.getStyle(el, 'width', defaultValue);
    if (width === 'auto') {
      width = el.offsetWidth;
    }
    return parseFloat(width);
  }
858225
function _outerWidth(el) {
    var b = parseInt(_getStyle(el, 'border-left-width'), 10) + parseInt(_getStyle(el, 'border-right-width'), 10)
      , p = parseInt(_getStyle(el, 'padding-left'), 10) + parseInt(_getStyle(el, 'padding-right'), 10)
      , w = el.offsetWidth
      , t;
    // For IE in case no border is set and it defaults to "medium"
    if (isNaN(b)) { b = 0; }
    t = b + p + w;
    return t;
  }
489432
public Envelope TileLatLonBounds( int tx, int ty, int zoom ) {
        double[] wsenBounds = TileBounds(tx, ty, zoom);
        double[] sw = MetersToLatLon(wsenBounds[0], wsenBounds[1]);
        double[] ne = MetersToLatLon(wsenBounds[2], wsenBounds[3]);
        return new Envelope(sw[1], ne[1], sw[0], ne[0]);
    }