Used when resizing the plane, resets the plane ratio factor.

        :param w: New width of the visible section of the plane.
        :param h: New height of the visible section of the plane.
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)
311189
def resize(self, width, height):
        
        self.width = width
        self.height = height
        self.buffer_width, self.buffer_height = self.width, self.height
        self.set_default_viewport()

        super().resize(self.buffer_width, self.buffer_height)
1291967
def imresize(self, data, new_wd, new_ht, method='bilinear'):
        
        old_ht, old_wd = data.shape[:2]
        start_time = time.time()

        if have_pilutil:
            means = 'PIL'
            zoom_x = float(new_wd) / float(old_wd)
            zoom_y = float(new_ht) / float(old_ht)
            if (old_wd >= new_wd) or (old_ht >= new_ht):
                # data size is bigger, skip pixels
                zoom = max(zoom_x, zoom_y)
            else:
                zoom = min(zoom_x, zoom_y)

            newdata = imresize(data, zoom, interp=method)

        else:
            raise ImageError("No way to scale image smoothly")

        end_time = time.time()
        self.logger.debug("scaling (%s) time %.4f sec" % (
            means, end_time - start_time))

        return newdata
1343763
public void put(double w, double h, T data) {
    if(LOG.isDebuggingFinest()) {
      LOG.finest("Add: " + w + "x" + h);
    }
    final int cols = widths.size();
    final int rows = heights.size();

    int bestsx = -1;
    int bestsy = -1;
    int bestex = cols - 1;
    int bestey = -1;
    double bestwi;
    double besthi;
    double bestinc;
    // Baseline: grow by adding to the top or to the right.
    {
      double i1 = computeIncreaseArea(w, Math.max(0, h - theight));
      double i2 = computeIncreaseArea(Math.max(0, w - twidth), h);
      if(i1 < i2) {
        bestwi = w;
        besthi = Math.max(0, h - theight);
        bestinc = i1;
      }
      else {
        bestwi = Math.max(0, w - twidth);
        besthi = h;
        bestinc = i2;
      }
    }
    // Find position with minimum increase
    for(int sy = 0; sy < rows; sy++) {
      for(int sx = 0; sx < cols; sx++) {
        if(usage.get(sy).get(sx) != null) {
          continue;
        }
        // Start with single cell
        double avw = widths.get(sx);
        double avh = heights.get(sy);
        int ex = sx;
        int ey = sy;
        while(avw < w || avh < h) {
          // Grow width first
          if(avw / avh < w / h) {
            if(avw < w && ex + 1 < cols) {
              boolean ok = true;
              // All unused?
              for(int y = sy; y <= ey; y++) {
                if(usage.get(y).get(ex + 1) != null) {
                  ok = false;
                }
              }
              if(ok) {
                ex += 1;
                avw += widths.get(ex);
                continue;
              }
            }
            if(avh < h && ey + 1 < rows) {
              boolean ok = true;
              // All unused?
              for(int x = sx; x <= ex; x++) {
                if(usage.get(ey + 1).get(x) != null) {
                  ok = false;
                }
              }
              if(ok) {
                ey += 1;
                avh += heights.get(ey);
                continue;
              }
            }
          }
          else { // Grow height first
            if(avh < h && ey + 1 < rows) {
              boolean ok = true;
              // All unused?
              for(int x = sx; x <= ex; x++) {
                if(usage.get(ey + 1).get(x) != null) {
                  ok = false;
                }
              }
              if(ok) {
                ey += 1;
                avh += heights.get(ey);
                continue;
              }
            }
            if(avw < w && ex + 1 < cols) {
              boolean ok = true;
              // All unused?
              for(int y = sy; y <= ey; y++) {
                if(usage.get(y).get(ex + 1) != null) {
                  ok = false;
                }
              }
              if(ok) {
                ex += 1;
                avw += widths.get(ex);
                continue;
              }
            }
          }
          break;
        }
        // Good match, or extension possible?
        if(avw < w && ex < cols - 1) {
          continue;
        }
        if(avh < h && ey < rows - 1) {
          continue;
        }
        // Compute increase:
        double winc = Math.max(0.0, w - avw);
        double hinc = Math.max(0.0, h - avh);
        double inc = computeIncreaseArea(winc, hinc);

        if(LOG.isDebuggingFinest()) {
          LOG.debugFinest("Candidate: " + sx + "," + sy + " - " + ex + "," + ey + ": " + avw + "x" + avh + " " + inc);
        }
        if(inc < bestinc) {
          bestinc = inc;
          bestsx = sx;
          bestsy = sy;
          bestex = ex;
          bestey = ey;
          bestwi = w - avw;
          besthi = h - avh;
        }
        if(inc == 0) {
          // Can't find better
          // TODO: try to do less splitting maybe?
          break;
        }
      }
      assert assertConsistent();
    }
    if(LOG.isDebuggingFinest()) {
      LOG.debugFinest("Best: " + bestsx + "," + bestsy + " - " + bestex + "," + bestey + " inc: " + bestwi + "x" + besthi + " " + bestinc);
    }
    // Need to increase the total area
    if(bestinc > 0) {
      assert(bestex == cols - 1 || bestey == rows - 1);
      double inc = Math.max(bestwi, besthi * ratio);
      resize(inc);

      // Resubmit
      put(w, h, data);
      return;
    }
    // Need to split a column.
    // TODO: find best column to split. Currently: last
    if(bestwi < 0.0) {
      splitCol(bestex, -bestwi);
      bestwi = 0.0;
    }
    // Need to split a row.
    // TODO: find best row to split. Currently: last
    if(besthi < 0.0) {
      splitRow(bestey, -besthi);
      besthi = 0.0;
    }
    for(int x = bestsx; x <= bestex; x++) {
      for(int y = bestsy; y <= bestey; y++) {
        usage.get(y).set(x, data);
      }
    }
    double xpos = 0.0;
    double ypos = 0.0;
    {
      for(int x = 0; x < bestsx; x++) {
        xpos += widths.get(x);
      }
      for(int y = 0; y < bestsy; y++) {
        ypos += heights.get(y);
      }
    }
    map.put(data, new double[] { xpos, ypos, w, h });
    if(LOG.isDebuggingFinest()) {
      logSizes();
    }
  }
3051
protected void adjustHomographSign( AssociatedPair p , DMatrixRMaj H ) {
		double val = GeometryMath_F64.innerProd(p.p2, H, p.p1);

		if( val < 0 )
			CommonOps_DDRM.scale(-1, H);
	}
954618
public void scaleAbsoluteWidth(float newWidth) {
		plainWidth = newWidth;
		float[] matrix = matrix();
		scaledWidth = matrix[DX] - matrix[CX];
		scaledHeight = matrix[DY] - matrix[CY];
		setWidthPercentage(0);
	}
1150933
def on_window_height_value_changed(self, hscale):
        
        val = hscale.get_value()
        self.settings.general.set_int('window-height', int(val))
1226414
function calculateVertexCount ( w, h, d ) {

		var vertices = 0;

		// calculate the amount of vertices for each side (plane)
		vertices += (w + 1) * (h + 1) * 2; // xy
		vertices += (w + 1) * (d + 1) * 2; // xz
		vertices += (d + 1) * (h + 1) * 2; // zy

		return vertices;

	}
759525
function resize(w, h) {
         // parent consctructor, resize camera rect
         this._super(me.Renderable, "resize", [w, h]); // disable damping while resizing


         this.smoothFollow = false; // update bounds

         var level = me.levelDirector.getCurrentLevel();
         this.setBounds(0, 0, Math.max(w, level ? level.width : 0), Math.max(h, level ? level.height : 0)); // reset everthing

         this.setDeadzone(w / 6, h / 6);
         this.update();
         this.smoothFollow = true;
         me.event.publish(me.event.VIEWPORT_ONRESIZE, [this.width, this.height]);
         return this;
       }
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()
590467
def resize(self, newWidth = 0, newHeight = 0):
        
        self.height = newHeight
        self.width = newWidth
1270446
def resize(self, dims):
        
        width, height = dims[:2]
        self.gl_resize(width, height)
693858
private void resize() {
        width  = getWidth() - getInsets().getLeft() - getInsets().getRight();
        height = getHeight() - getInsets().getTop() - getInsets().getBottom();
        size   = width < height ? width : height;

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

            segmentPane.setPrefSize(size, size);

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

            centerX = size * 0.5;
            centerY = centerX;

            redraw();
        }
    }
389341
def resize(self, dims):
        
        width, height = dims[:2]
        self.logger.debug("renderer reconfigured to %dx%d" % (
            width, height))
        if self.surface_type == 'qpixmap':
            self.surface = QPixmap(width, height)
        else:
            self.surface = QImage(width, height, self.qimg_fmt)
450754
function resize() {
    var w = $(window).width(), h = $(window).height();
    canvas.attr({ width: w, height: h });
    scene.getCamera().setAspect(w / h);
    renderer.clearViewport();
  }
1061548
def resize(self, width, height):
        
        self._set_propagation(width, height)
        
        super(Box, self).resize(width, height)
590083
function setProjection(w, h) {
         this.flush();
         this.gl.viewport(0, 0, w, h);
         this.uMatrix.setTransform(2 / w, 0, 0, 0, -2 / h, 0, -1, 1, 1);
       }