4 times width, 1.5 times height
17227
def set_broad_fig_style(self):
        ''''''
        plt.rcParams.update({
            'figure.figsize' : [self.frontierswidth/self.inchpercm*4, self.frontierswidth/self.inchpercm*1.5],
        })
721408
def resize_to_fill(width, height, img, gravity='Center')
			cols, rows = img[:dimensions]
			img.combine_options do |cmd|
				if width != cols || height != rows
					scale_x = width/cols.to_f
					scale_y = height/rows.to_f
					if scale_x >= scale_y
						cols = (scale_x * (cols + 0.5)).round
						rows = (scale_x * (rows + 0.5)).round
						cmd.resize "#{cols}"
					else
						cols = (scale_y * (cols + 0.5)).round
						rows = (scale_y * (rows + 0.5)).round
						cmd.resize "x#{rows}"
					end
				end

				cmd.gravity gravity
				cmd.background 'rgba(255,255,255,0.0)'
				cmd.extent "#{width}x#{height}" if cols != width || rows != height
			end
		end
810115
def _spiral(width, height):
        

        if width == 1:
            for y in range(height - 1, -1, -1):
                yield 0, y
            return
        if height == 1:
            for x in range(width - 1, -1, -1):
                yield x, 0
            return

        if width <= height:
            x0 = width // 2
            if width % 2:
                for y in range(height - 1 - x0, x0 - 1, -1):
                    yield x0, y
            x0 -= 1
            y0 = x0
        else:
            y0 = height // 2
            if height % 2:
                for x in range(width - 1 - y0, y0 - 1, -1):
                    yield x, y0
            y0 -= 1
            x0 = y0

        while x0 >= 0:
            x1 = width - x0 - 1
            y1 = height - y0 - 1

            for y in range(y0 + 1, y1):
                yield x0, y
            for x in range(x0, x1):
                yield x, y1
            for y in range(y1, y0, -1):
                yield x1, y
            for x in range(x1, x0 - 1, -1):
                yield x, y0

            x0 -= 1
            y0 -= 1
859801
function transformCoordinate(canvas, width, height, orientation) {
        switch (orientation) {
            case 5:
            case 6:
            case 7:
            case 8:
                canvas.width = height;
                canvas.height = width;
                break;
            default:
                canvas.width = width;
                canvas.height = height;
        }
        var ctx = canvas.getContext("2d");
        switch (orientation) {
            case 2:
                // horizontal flip
                ctx.translate(width, 0);
                ctx.scale(-1, 1);
                break;
            case 3:
                // 180 rotate left
                ctx.translate(width, height);
                ctx.rotate(Math.PI);
                break;
            case 4:
                // vertical flip
                ctx.translate(0, height);
                ctx.scale(1, -1);
                break;
            case 5:
                // vertical flip + 90 rotate right
                ctx.rotate(0.5 * Math.PI);
                ctx.scale(1, -1);
                break;
            case 6:
                // 90 rotate right
                ctx.rotate(0.5 * Math.PI);
                ctx.translate(0, -height);
                break;
            case 7:
                // horizontal flip + 90 rotate right
                ctx.rotate(0.5 * Math.PI);
                ctx.translate(width, -height);
                ctx.scale(-1, 1);
                break;
            case 8:
                // 90 rotate left
                ctx.rotate(-0.5 * Math.PI);
                ctx.translate(-width, 0);
                break;
            default:
                break;
        }
    }
450250
@Override protected void resize() {
        double width  = getSkinnable().getWidth() - getSkinnable().getInsets().getLeft() - getSkinnable().getInsets().getRight();
        double height = getSkinnable().getHeight() - getSkinnable().getInsets().getTop() - getSkinnable().getInsets().getBottom();
        size          = width < height ? width : height;

        if (size > 0) {
            double center = size * 0.5;

            pane.setMaxSize(size, size);
            pane.relocate((getSkinnable().getWidth() - size) * 0.5, (getSkinnable().getHeight() - size) * 0.5);

            dropShadow.setRadius(0.008 * size);
            dropShadow.setOffsetY(0.008 * size);

            sectionsAndAreasCanvas.setWidth(size);
            sectionsAndAreasCanvas.setHeight(size);

            tickCanvas.setWidth(size);
            tickCanvas.setHeight(size);

            alarmPane.setMaxSize(size, size);

            hour.setFill(getSkinnable().getHourColor());
            hour.setCache(false);
            hour.setWidth(size * 0.015);
            hour.setHeight(size * 0.29);
            hour.setArcWidth(size * 0.015);
            hour.setArcHeight(size * 0.015);
            hour.setCache(true);
            hour.setCacheHint(CacheHint.ROTATE);
            hour.relocate((size - hour.getWidth()) * 0.5, size * 0.21);

            minute.setFill(getSkinnable().getMinuteColor());
            minute.setCache(false);
            minute.setWidth(size * 0.015);
            minute.setHeight(size * 0.47);
            minute.setArcWidth(size * 0.015);
            minute.setArcHeight(size * 0.015);
            minute.setCache(true);
            minute.setCacheHint(CacheHint.ROTATE);
            minute.relocate((size - minute.getWidth()) * 0.5, size * 0.03);

            second.setFill(getSkinnable().getSecondColor());
            second.setCache(false);
            second.setWidth(size * 0.005);
            second.setHeight(size * 0.47);
            second.setArcWidth(size * 0.015);
            second.setArcHeight(size * 0.015);
            second.setCache(true);
            second.setCacheHint(CacheHint.ROTATE);
            second.relocate((size - second.getWidth()) * 0.5, size * 0.03);

            knob.setFill(getSkinnable().getKnobColor());
            knob.setRadius(size * 0.0225);
            knob.setCenterX(center);
            knob.setCenterY(center);

            title.setFill(getSkinnable().getTextColor());
            title.setFont(Fonts.latoLight(size * 0.12));
            title.relocate((size - title.getLayoutBounds().getWidth()) * 0.5, size * 0.25);

            dateText.setFill(getSkinnable().getDateColor());
            dateText.setFont(Fonts.latoLight(size * 0.05));
            dateText.relocate((center - dateText.getLayoutBounds().getWidth()) * 0.5 + (size * 0.45), (size - dateText.getLayoutBounds().getHeight()) * 0.5);

            text.setFill(getSkinnable().getTextColor());
            text.setFont(Fonts.latoLight(size * 0.12));
            text.relocate((size - text.getLayoutBounds().getWidth()) * 0.5, size * 0.6);

            minuteRotate.setPivotX(minute.getWidth() * 0.5);
            minuteRotate.setPivotY(minute.getHeight());
            hourRotate.setPivotX(hour.getWidth() * 0.5);
            hourRotate.setPivotY(hour.getHeight());
            secondRotate.setPivotX(second.getWidth() * 0.5);
            secondRotate.setPivotY(second.getHeight());
        }
    }
1284913
function(width, height) {
      this.getPos(true);
      this.translateOffsetX = this.translateOffsetY = 0;
      this.scaleOffsetX = this.scaleOffsetY = 1;
      for(var i=0, l=this.canvases.length; i<l; i++) {
        this.canvases[i].resize(width, height);
      }
      var style = this.element.style;
      style.width = width + 'px';
      style.height = height + 'px';
      if(this.labelContainer)
        this.labelContainer.style.width = width + 'px';
    }
770453
function(left,top,width,height){
                     var el = this.element;
                     var newCanvas=WireIt.cn("canvas",{className:el.className || el.getAttribute("class"),width:width,height:height},{left:left+"px",top:top+"px"});
                     var listeners=Event.getListeners(el);
                     for(var listener in listeners){
								if(listeners.hasOwnProperty(listener)) {
									var l=listeners[listener];
									Event.addListener(newCanvas,l.type,l.fn,l.obj,l.adjust);
								}
                     }
                     Event.purgeElement(el);
                     el.parentNode.replaceChild(newCanvas,el);
                     this.element = newCanvas;
                  }
1061548
def resize(self, width, height):
        
        self._set_propagation(width, height)
        
        super(Box, self).resize(width, height)
699190
@Override protected void resize() {
        double width  = clock.getWidth() - clock.getInsets().getLeft() - clock.getInsets().getRight();
        double height = clock.getHeight() - clock.getInsets().getTop() - clock.getInsets().getBottom();
        size          = width < height ? width : height;

        if (size > 0) {
            double center = size * 0.5;

            pane.setMaxSize(size, size);
            pane.relocate((clock.getWidth() - size) * 0.5, (clock.getHeight() - size) * 0.5);

            secondBackgroundCircle.setCenterX(center);
            secondBackgroundCircle.setCenterY(center);
            secondBackgroundCircle.setRadius(size * 0.48590226);
            secondBackgroundCircle.setStrokeWidth(size * 0.02819549);

            secondArc.setCenterX(center);
            secondArc.setCenterY(center);
            secondArc.setRadiusX(size * 0.48590226);
            secondArc.setRadiusY(size * 0.48590226);
            secondArc.setStrokeWidth(size * 0.02819549);

            dateText.setFont(Fonts.robotoLight(size * 0.08082707));
            dateNumbers.setFont(Fonts.robotoLight(size * 0.08082707));

            hour.setFont(Fonts.robotoMedium(size * 0.328));
            minute.setFont(Fonts.robotoThin(size * 0.328));
        }
    }
431085
def resize(self, height, width, **kwargs):
        
        self.client.resize(self.container, height=height, width=width)
1032938
function(width, height){
    var canvas = document.createElement("canvas");
    canvas.width = width;
    canvas.height = height;
    var context = canvas.getContext("2d");
    var imageData = context.getImageData(0, 0, width, height);
    var buffer = new ArrayBuffer(width*height*4);
    var buffer8 = new Uint8ClampedArray(buffer);
    var buffer32 = new Uint32Array(buffer);
    return {
      canvas: canvas,
      context: context,
      width: width,
      height: height,
      imageData: imageData,
      buffer8: buffer8,
      buffer32: buffer32};
  }
590467
def resize(self, newWidth = 0, newHeight = 0):
        
        self.height = newHeight
        self.width = newWidth
1175795
def as_int(width, height):
    ""
    gcd = get_gcd(width, height)
    return int(width / gcd), int(height / gcd)
232064
def dimensions
      height = self.count
      width = self.collect{|a| a.length}.max
      [width,height]
    end
789753
function(width, height, animate) {

		if (width) {
			this.options.width = width;
		}
		if (height && height != this.options.height) {
			this.options.height = height;
			this.timescale = this._getTimeScale();
		}

		// Size Markers
		this._assignRowsToMarkers();

		// Size swipable area
		this._el.slider_background.style.width = this.timescale.getPixelWidth() + this.options.width + "px";
		this._el.slider_background.style.left = -(this.options.width/2) + "px";
		this._el.slider.style.width = this.timescale.getPixelWidth() + this.options.width + "px";

		// Update Swipable constraint
		this._swipable.updateConstraint({top: false,bottom: false,left: (this.options.width/2),right: -(this.timescale.getPixelWidth() - (this.options.width/2))});

		// Go to the current slide
		this.goToId(this.current_id, true);
	}
1274784
function Maze(width, height) {
    if (width < 0 || height < 0)
        throw new Error('invalid size: ' + width + 'x' + height);
    this._width = width;
    this._height = height;
    this._blockWidth = ((width+1)+15) >> 4;
    this._grid = new Array(this._blockWidth * (height + 1));
    for (var i = 0; i < this._blockWidth * (height + 1); i ++)
        this._grid[i] = 0;
}
510466
function(width, height, radius) {

            var minValue = Math.floor(Math.min(width / 2, height / 2));

            return Math.min(minValue, radius);

        }