set the render window size
492572
def window_size(self, window_size):
        
        BasePlotter.window_size.fset(self, window_size)
        self.app_window.setBaseSize(*window_size)
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();
        }
    }
1038019
function sizeiframe(size,animate) {
    var theSize;

    if(size>maxViewportWidth) { //If the entered size is larger than the max allowed viewport size, cap value at max vp size
      theSize = maxViewportWidth;
    } else if(size<minViewportWidth) { //If the entered size is less than the minimum allowed viewport size, cap value at min vp size
      theSize = minViewportWidth;
    } else {
      theSize = size;
    }

    //Conditionally remove CSS animation class from viewport
    if(animate===false) {
      $('#sg-gen-container,#sg-viewport').removeClass("vp-animate"); //If aninate is set to false, remove animate class from viewport
    } else {
      $('#sg-gen-container,#sg-viewport').addClass("vp-animate");
    }

    $('#sg-gen-container').width(theSize+viewportResizeHandleWidth); //Resize viewport wrapper to desired size + size of drag resize handler
    $sgViewport.width(theSize); //Resize viewport to desired size

    var targetOrigin = (window.location.protocol === "file:") ? "*" : window.location.protocol+"//"+window.location.host;
    var obj = JSON.stringify({ "event": "patternLab.resize", "resize": "true" });
    document.getElementById('sg-viewport').contentWindow.postMessage(obj,targetOrigin);

    updateSizeReading(theSize); //Update values in toolbar
    saveSize(theSize); //Save current viewport to cookie
  }
520535
public void adjustGlassSize() {
        if (isGlassEnabled()) {
            ResizeHandler handler = getGlassResizer();
            if (handler != null) handler.onResize(null);
        }
    }
59646
def speckleWindowSize(self, value):
        """"""
        if value >= 0 and value <= 200:
            self._speckle_window_size = value
        else:
            raise InvalidSpeckleWindowSizeError("Speckle window size must be 0 "
                                                "for disabled checks or "
                                                "between 50 and 200.")
        self._replace_bm()
179843
def resize(self, w, h):
        
        self.plane_w = w
        self.plane_h = h
        self.plane_ratio = self.char_ratio * w / h

        if self.crosshairs:
            self.crosshairs_coord = ((w + 2) // 2, (h + 2) // 2)
754501
function _setViewSize() {
        if (hasScrollContainer) {
            const width = viewEl.offsetWidth;
            const height = viewEl.offsetHeight;
            return view.setSize(width, height);
        }

        const html = document.documentElement;
        const width = window.innerWidth || html.clientWidth;
        const height = window.innerHeight || html.clientHeight;

        return view.setSize(width, height);
    }
1235235
private void resize() {
        double width  = getWidth() - getInsets().getLeft() - getInsets().getRight();
        double height = getHeight() - getInsets().getTop() - getInsets().getBottom();
        size          = width < height ? width : height;

        if (size > 0) {
            pane.setMaxSize(size, size);
            pane.relocate((getWidth() - size) * 0.5, (getHeight() - size) * 0.5);
            pane.setBackground(new Background(new BackgroundFill(getChartBackgroundColor(), new CornerRadii(1024), Insets.EMPTY)));

            chartCanvas.setWidth(size);
            chartCanvas.setHeight(size);

            overlayCanvas.setWidth(size);
            overlayCanvas.setHeight(size);

            redraw();
        }
    }
308107
function() {
        var c = this._canvas;
        c.width = Crafty.viewport.width;
        c.height = Crafty.viewport.height;

        var gl = this.context;
        gl.viewportWidth = c.width;
        gl.viewportHeight = c.height;
    }
176687
public final void setScreenWidth(int screenWidth)
    {
        final int wi = (int) Math.ceil(screenWidth / (double) sprite.getWidth()) + 1;
        w = wi;
    }
423531
def configure(self, width, height):
        """"""
        self._imgwin_set = True
        self.set_window_size(width, height)
292849
function screenSize() {
        var w = window.outerWidth || html.clientWidth;

        // remove earlier widths
        html.className = html.className.replace(/ (w|lt)-\d+/g, "");

        // add new ones
        pushClass("w-" + Math.round(w / 100) * 100);

        each(conf.screens, function(width) {
            if (w <= width) { pushClass("lt-" + width); }
        });

        api.feature();
    }
264897
def resize(widthWindow, heightWindow):
	""""""
	glViewport(0, 0, widthWindow, heightWindow)
	glMatrixMode(GL_PROJECTION)
	glLoadIdentity()
	gluPerspective(70, 1.0*widthWindow/heightWindow, 0.001, 10000.0)
	glMatrixMode(GL_MODELVIEW)
	glLoadIdentity()
128851
def set_renderer(self, renderer):
        
        viewport = None
        if renderer == 'opengl':
            from enaml.qt.QtWidgets import QOpenGLWidget
            viewport = QOpenGLWidget()
        elif renderer == 'default':
            try:
                from enaml.qt.QtWidgets import QOpenGLWidget
                viewport = QOpenGLWidget()
            except ImportError as e:
                warnings.warn(
                    "QOpenGLWidget could not be imported: {}".format(e))
        self.widget.setViewport(viewport)
929444
function() {
    if (!this._resize) {
      return;
    }
    this._resize = false;
    this._cam.setViewportSize(this._canvas.viewportWidth(), 
                              this._canvas.viewportHeight());
    this._pickBuffer.resize(this._options.width, this._options.height);
  }
906260
def set_window_size(self, rows, cols):
        
        if not self.can_naws:
            return
        self.window_size = rows, cols
        size = struct.pack('!HH', cols, rows)
        self.sock.send(IAC + SB + NAWS + size + IAC + SE)
575318
function resizeHandler()
			{
				var viewPaneSize = mainWindow.getViewPaneSize();
				shim && shim.setStyles( { width : viewPaneSize.width + 'px', height : viewPaneSize.height + 'px' } );
				editor.resize( viewPaneSize.width, viewPaneSize.height, null, true );
			}