Scale all widgets in Main Scene hierarchy
@param scale
764335
public void setScale(final float scale) {
        if (equal(mScale, scale) != true) {
            Log.d(TAG, "setScale(): old: %.2f, new: %.2f", mScale, scale);
            mScale = scale;
            setScale(mSceneRootObject, scale);
            setScale(mMainCameraRootObject, scale);
            setScale(mLeftCameraRootObject, scale);
            setScale(mRightCameraRootObject, scale);
            for (OnScaledListener listener : mOnScaledListeners) {
                try {
                    listener.onScaled(scale);
                } catch (Exception e) {
                    e.printStackTrace();
                    Log.e(TAG, e, "setScale()");
                }
            }
        }
    }
1107965
private void updateScaleList() {
		refreshPixelLength(); /* retrieve pixelLength from mapWidget. Needed in case mapWidget wasn't fully initialized
					the previous time the pixelLength was requested */

		// Update lookup map (stores user friendly representation):
		valueToScale.clear();
		if (!Double.isNaN(pixelLength) && (0.0 != pixelLength)) {
			for (Double scale : scaleList) {
				// Eliminate duplicates and null:
				if (scale != null) {
					String value = ScaleConverter.scaleToString(scale, precision, significantDigits);
					valueToScale.put(value, scale);
				}
			}

			List<String> availableScales = new ArrayList<String>();

			for (Double scale : scaleList) {
				if (mapView.isResolutionAvailable(pixelLength / scale)) {
					availableScales.add(ScaleConverter.scaleToString(scale, precision, significantDigits));
				}
			}

			scaleItem.setValueMap(availableScales.toArray(new String[availableScales.size()]));

			isScaleItemInitialized = true;
		}
	}
403762
public void recalculateScale() throws SlickException {
		targetWidth = container.getWidth();
		targetHeight = container.getHeight();
		
		if (maintainAspect) {
			boolean normalIsWide = (normalWidth / normalHeight > 1.6 ? true : false);
			boolean containerIsWide = ((float) targetWidth / (float) targetHeight > 1.6 ? true : false);
			float wScale = targetWidth / normalWidth;
			float hScale = targetHeight / normalHeight;

			if (normalIsWide & containerIsWide) {
				float scale = (wScale < hScale ? wScale : hScale);
				targetWidth = (int) (normalWidth * scale);
				targetHeight = (int) (normalHeight * scale);
			} else if (normalIsWide & !containerIsWide) {
				targetWidth = (int) (normalWidth * wScale);
				targetHeight = (int) (normalHeight * wScale);
			} else if (!normalIsWide & containerIsWide) {
				targetWidth = (int) (normalWidth * hScale);
				targetHeight = (int) (normalHeight * hScale);
			} else {
				float scale = (wScale < hScale ? wScale : hScale);
				targetWidth = (int) (normalWidth * scale);
				targetHeight = (int) (normalHeight * scale);
			}

		} 
		
		if (held instanceof InputListener) {
			container.getInput().addListener((InputListener) held);
		}
		container.getInput().setScale(normalWidth / targetWidth,
									  normalHeight / targetHeight);
		

		int yoffset = 0;
		int xoffset = 0;
		
		if (targetHeight < container.getHeight()) {
			yoffset = (container.getHeight() - targetHeight) / 2;
		}
		if (targetWidth < container.getWidth()) {
			xoffset = (container.getWidth() - targetWidth) / 2;
		}
		container.getInput().setOffset(-xoffset / (targetWidth / normalWidth), 
									   -yoffset / (targetHeight / normalHeight));
		
	}
1275691
def display(self):
        """"""
        lg.debug('GraphicsScene is between {}s and {}s'.format(self.minimum,
                                                               self.maximum))

        x_scale = 1 / self.parent.value('overview_scale')
        lg.debug('Set scene x-scaling to {}'.format(x_scale))

        self.scale(1 / self.transform().m11(), 1)  # reset to 1
        self.scale(x_scale, 1)

        self.scene = QGraphicsScene(self.minimum, 0,
                                    self.maximum,
                                    TOTAL_HEIGHT)
        self.setScene(self.scene)

        # reset annotations
        self.idx_markers = []
        self.idx_annot = []

        self.display_current()

        for name, pos in BARS.items():
            item = QGraphicsRectItem(self.minimum, pos['pos0'],
                                     self.maximum, pos['pos1'])
            item.setToolTip(pos['tip'])
            self.scene.addItem(item)

        self.add_timestamps()
947339
public void setScale(double scale)
    {
        if(scale <= 0 || Double.isNaN(scale) || Double.isInfinite(scale))
            throw new ArithmeticException("Scale must be a positive value, not " + scale);
        this.scale = scale;
        this.logScale = log(scale);
    }
1101638
public void setScalebarEnabled(boolean enabled) {
		scaleBarEnabled = enabled;
		final String scaleBarId = "scalebar";

		if (scaleBarEnabled) {
			if (!getMapAddons().containsKey(scaleBarId)) {
				ScaleBar scalebar = new ScaleBar(scaleBarId, this);
				scalebar.setVerticalAlignment(VerticalAlignment.BOTTOM);
				scalebar.setHorizontalMargin(2);
				scalebar.setVerticalMargin(2);
				scalebar.initialize(getMapModel().getMapInfo().getDisplayUnitType(), unitLength, new Coordinate(20,
						graphics.getHeight() - 25));
				registerMapAddon(scalebar);
			}
		} else {
			unregisterMapAddon(addons.get(scaleBarId));
		}
	}
452065
public void setScalingPlanResources(java.util.Collection<ScalingPlanResource> scalingPlanResources) {
        if (scalingPlanResources == null) {
            this.scalingPlanResources = null;
            return;
        }

        this.scalingPlanResources = new java.util.ArrayList<ScalingPlanResource>(scalingPlanResources);
    }
246500
private static void doLayout(
            final Graphics2D graphics2d, final ScalebarAttributeValues scalebarParams,
            final ScaleBarRenderSettings settings) {
        final Dimension maxLabelSize = getMaxLabelSize(settings);

        int numSubIntervals = 1;
        if (scalebarParams.subIntervals) {
            numSubIntervals = getNbSubIntervals(
                    settings.getScaleUnit(), settings.getIntervalLengthInWorldUnits(),
                    settings.getIntervalUnit());
        }

        settings.setBarSize(getBarSize(settings));
        settings.setLabelDistance(getLabelDistance(settings));
        settings.setLineWidth(getLineWidth(settings));
        settings.setSize(getSize(scalebarParams, settings, maxLabelSize));
        settings.setMaxLabelSize(maxLabelSize);
        settings.setNumSubIntervals(numSubIntervals);

        ScalebarDrawer drawer = scalebarParams.getType().createDrawer(graphics2d, settings);
        drawer.draw();
    }
612046
public void scale(double scaleX, double scaleY) {
		this.m00 *= scaleX;
		this.m11 *= scaleY;
		this.m01 *= scaleY;
		this.m10 *= scaleX;
	}
1062026
@Override public void updateScale(float verticalDragOffset) {
    ViewHelper.setScaleX(getView(), 1 - verticalDragOffset / getXScaleFactor());
    ViewHelper.setScaleY(getView(), 1 - verticalDragOffset / getYScaleFactor());
  }
830348
public void setHorizontalScaling(float scale) {
        state.scale = scale;
        content.append(scale).append(" Tz").append_i(separator);
    }
7998
def scale_cb(self, setting, value):
        """"""
        zoomlevel = self.zoom.calc_level(value)
        self.t_.set(zoomlevel=zoomlevel)

        self.redraw(whence=0)
263730
public static void scaleIntrinsic(CameraPinhole param , double scale ) {
		param.width = (int)(param.width*scale);
		param.height = (int)(param.height*scale);
		param.cx *= scale;
		param.cy *= scale;
		param.fx *= scale;
		param.fy *= scale;
		param.skew *= scale;
	}
1068735
public void setMapSize(int mapWidth, int mapHeight) {
		super.setMapSize(mapWidth, mapHeight);
		if (null == unitType) {
			throw new IllegalStateException("Please initialize scale bar before using");
		}
		backGround.getBounds().setX(getUpperLeftCorner().getX());
		backGround.getBounds().setY(getUpperLeftCorner().getY());
		bottomLine.getBounds().setX(getUpperLeftCorner().getX() + HORIZONTAL_PADDING);
		bottomLine.getBounds().setY(getUpperLeftCorner().getY() + VERTICAL_PADDING + MARKER_HEIGHT);
		leftMarker.getBounds().setX(getUpperLeftCorner().getX() + HORIZONTAL_PADDING);
		leftMarker.getBounds().setY(getUpperLeftCorner().getY() + VERTICAL_PADDING);
		rightMarker.getBounds().setY(getUpperLeftCorner().getY() + VERTICAL_PADDING);
		distance.setPosition(new Coordinate(getUpperLeftCorner().getX() + HORIZONTAL_PADDING + 6,
				getUpperLeftCorner().getY() + VERTICAL_PADDING));
	}
4339
public Matrix4 setToScale (IVector3 scale) {
        return setToScale(scale.x(), scale.y(), scale.z());
    }
643901
public void scale(Tuple2D<?> tuple) {
		assert tuple != null : AssertMessages.notNullParameter();
		scale(tuple.getX(), tuple.getY());
	}
1299900
public static void scale(double a, double[] x) {
        for (int i = 0; i < x.length; i++) {
            x[i] *= a;
        }
    }