when scaling it to fit a view will not be significant.
353084
private static int getThumbnailKind(ResizeOptions resizeOptions) {
    if (ThumbnailSizeChecker.isImageBigEnough(
        MICRO_THUMBNAIL_DIMENSIONS.width(),
        MICRO_THUMBNAIL_DIMENSIONS.height(),
        resizeOptions)) {
      return MediaStore.Images.Thumbnails.MICRO_KIND;
    } else if (ThumbnailSizeChecker.isImageBigEnough(
        MINI_THUMBNAIL_DIMENSIONS.width(),
        MINI_THUMBNAIL_DIMENSIONS.height(),
        resizeOptions)) {
      return MediaStore.Images.Thumbnails.MINI_KIND;
    } else {
      return NO_THUMBNAIL;
    }
  }
519706
private ImageScale scaleImage(int imageX, int imageY, int containerX, int containerY) {
		ImageScale ret = new ImageScale();
		// Compare aspects faster by multiplying out the divisors.
		if (imageX * containerY > imageY * containerX) {
			// Image aspect wider than container
			ret.scale = (float) containerX / imageX;
			ret.deltaY = ((float) containerY - (ret.scale * imageY)) / 2.0f;
		} else {
			// Image aspect taller than container
			ret.scale = (float) containerY / imageY;
			ret.deltaX = ((float) containerX - (ret.scale * imageX)) / 2.0f;
		}
		return ret;
	}
471113
def scale(self, x, y=None, z=None):
        ""
        if y is None:
            y = x
        if z is None:
            z = x
        m = self
        for col in range(4):
            # Only the top three rows
            m[0,col] *= x
            m[1,col] *= y
            m[2,col] *= z
        return self
467806
private int setViewSize(int mode, int size, int drawableWidth) {
        int viewSize;
        switch (mode) {
            case MeasureSpec.EXACTLY:
                viewSize = size;
                break;

            case MeasureSpec.AT_MOST:
                viewSize = Math.min(drawableWidth, size);
                break;

            case MeasureSpec.UNSPECIFIED:
                viewSize = drawableWidth;
                break;

            default:
                viewSize = size;
                break;
        }
        return viewSize;
    }
452828
private static void scaleDownFive(Slice decimal, int fiveScale, Slice result)
    {
        while (true) {
            int powerFive = Math.min(fiveScale, MAX_POWER_OF_FIVE_INT);
            fiveScale -= powerFive;

            int divisor = POWERS_OF_FIVES_INT[powerFive];
            divide(decimal, divisor, result);
            decimal = result;

            if (fiveScale == 0) {
                return;
            }
        }
    }
1051878
def scale(self, factor, inplace=True):
        
        if not inplace:
            t = self.copy()
        else:
            t = self
        t._tree.scale_edges(factor)
        t._dirty = True
        return t
380383
function () {
            var fitWidth = this.calculateZoomValue(ZOOM_FIT_WIDTH),
                fitHeight = this.calculateZoomValue(ZOOM_FIT_HEIGHT);
            return Math.min(fitWidth, fitHeight);
        }
685406
def on_resize(width, height):
	""""""
	glViewport(0, 0, width, height)
	glMatrixMode(GL_PROJECTION)
	glLoadIdentity()
	gluPerspective(30, 1.0*width/height, 0.1, 1000.0)
	glMatrixMode(GL_MODELVIEW)
	glLoadIdentity()
145227
function() {
        var style = this._div.style,
            view = this._viewportRect();

        var scale = view._scale;
        var dx = -view._x * scale;
        var dy = -view._y * scale;

        style.transform = style[Crafty.support.prefix + "Transform"] =
            "scale(" + scale + ", " + scale + ")";
        style.left = Math.round(dx) + "px";
        style.top = Math.round(dy) + "px";
        style.zIndex = this.options.z;
    }
717057
def do_fit(self, event, min_size=None):
        
        #self.grid.ShowScrollbars(wx.SHOW_SB_NEVER, wx.SHOW_SB_NEVER)
        if event:
            event.Skip()
        self.main_sizer.Fit(self)
        disp_size = wx.GetDisplaySize()
        actual_size = self.GetSize()
        # if there isn't enough room to display new content
        # resize the frame
        if disp_size[1] - 75 < actual_size[1]:
            self.SetSize((actual_size[0], disp_size[1] * .95))
        # make sure you adhere to a minimum size
        if min_size:
            actual_size = self.GetSize()
            larger_width = max([actual_size[0], min_size[0]])
            larger_height = max([actual_size[1], min_size[1]])
            if larger_width > actual_size[0] or larger_height > actual_size[1]:
                self.SetSize((larger_width, larger_height))
        self.Centre()
432724
public void scale(double s, Vector3d v1) {
        x = s * v1.x;
        y = s * v1.y;
        z = s * v1.z;
    }
238605
function () {
        if (__autoresizes == null && layout._listeners && layout._listeners['viewportResized']) {
            __init();
        } else if (__autoresizes != null && __autoresizes.length === 0
                && (layout._listeners == null || layout._listeners['viewportResized'] == null)) {
            __reset();
        }
    }
1303454
def scaleY(self, canvasY):
        ''
        plotterY = super().scaleY(canvasY)
        return (self.plotviewBox.ymax-plotterY+4)
242484
def do_size(self, w, h):
        """"""
        if (w is None):
            self.logger.debug("size: no scaling (nop)")
        else:
            self.logger.debug("size: scaling to (%d,%d)" % (w, h))
            self.image = self.image.resize((w, h))
            self.width = w
            self.height = h
687992
private void resize() {
        width  = getWidth() - getInsets().getLeft() - getInsets().getRight();
        height = getHeight() - getInsets().getTop() - getInsets().getBottom();
        size   = width < height ? width : height;

        double center = size * 0.5;

        if (width > 0 && height > 0) {
            pane.setMaxSize(size, size);
            pane.setPrefSize(size, size);
            pane.relocate((getWidth() - size) * 0.5, (getHeight() - size) * 0.5);

            ring.setStrokeWidth(size * 0.078125);
            ring.setRadius(center);
            ring.setCenterX(center);
            ring.setCenterY(center);

            dot.setRadius(size * 0.3125);
            dot.setCenterX(center);
            dot.setCenterY(center);

            redraw();
        }
    }
1164364
def world_to_view(v):
    """"""
    return v.x * config.scale_x, v.y * config.scale_y
660209
public void scaleAbsolute(float newWidth, float newHeight) {
		plainWidth = newWidth;
		plainHeight = newHeight;
		float[] matrix = matrix();
		scaledWidth = matrix[DX] - matrix[CX];
		scaledHeight = matrix[DY] - matrix[CY];
		setWidthPercentage(0);
	}