Calls {@link AbstractLmlView#resize(int, int, boolean)} on current view if it isn't empty.

@param width current application width.
@param height current application height.
@see #isCenteringCameraOnResize()
438695
@Override
    public void resize(final int width, final int height) {
        if (currentView != null) {
            currentView.resize(width, height, isCenteringCameraOnResize());
        }
    }
818406
private void resizeIfNeeded()
    {
        // resize the window if we need to
        int oldRenderWidth = Display.getWidth(); 
        int oldRenderHeight = Display.getHeight();
        if( this.renderWidth == oldRenderWidth && this.renderHeight == oldRenderHeight )
            return;
        
        try {
            int old_x = Display.getX();
            int old_y = Display.getY();
            Display.setLocation(old_x, old_y);
            Display.setDisplayMode(new DisplayMode(this.renderWidth, this.renderHeight));
            System.out.println("Resized the window");
        } catch (LWJGLException e) {
            System.out.println("Failed to resize the window!");
            e.printStackTrace();
        }
        forceResize(this.renderWidth, this.renderHeight);
    }
58769
private void init(final int WIDTH, final int HEIGHT) {
        if (WIDTH <= 1) {
            return;
        }

        if (batteryImage != null) {
            batteryImage.flush();
        }
        batteryImage = create_BATTERY_Image(WIDTH, HEIGHT - getInsets().bottom, value);
    }
590467
def resize(self, newWidth = 0, newHeight = 0):
        
        self.height = newHeight
        self.width = newWidth
384623
function resize(w, h) {
			w && self.view.win.width(w);
			h && self.view.nav.add(self.view.cwd).height(h);
		}
1138940
def on_resize(self, event):
        
        self._update_transforms()
        
        if self._central_widget is not None:
            self._central_widget.size = self.size
            
        if len(self._vp_stack) == 0:
            self.context.set_viewport(0, 0, *self.physical_size)
936540
public function resize(int $width = 0, int $height = 0)
    {
        if (!$width && !$height) {
            throw new ImageException('You must supply at least one dimension');
        }
        $iw = $this->info[0];
        $ih = $this->info[1];
        if (!$height || !$width) {
            if (!$width) {
                $width  = $height / $ih * $iw;
            }
            if (!$height) {
                $height = $width  / $iw * $ih;
            }
        }
        $di = imagecreatetruecolor($width, $height);
        imagecopyresized($di, $this->data, 0, 0, 0, 0, $width, $height, $iw, $ih);
        $this->data = $di;
    }
693440
def resize(self, width, height):
        
        # set the internal listbox width to be 0 as otherwise it maintains a default
        # size and you cant make the control smaller than that.
        self._listbox._set_tk_config("width", None if width is None else 0)
        self._set_propagation(width, height)
        super(ListBox, self).resize(width, height)
120726
@Override
    public final AbstractGauge init(int WIDTH, int HEIGHT) {
        if (WIDTH <= 1 || HEIGHT <= 1) {
            return this;
        }

        if (isDigitalFont()) {
            setLcdValueFont(getModel().getDigitalBaseFont().deriveFont(0.7f * WIDTH * 0.10f));
        } else {
            setLcdValueFont(getModel().getStandardBaseFont().deriveFont(0.625f * WIDTH * 0.10f));
        }

        if (isCustomLcdUnitFontEnabled()) {
            setLcdUnitFont(getCustomLcdUnitFont().deriveFont(0.25f * WIDTH * 0.10f));
        } else {
            setLcdUnitFont(getModel().getStandardBaseFont().deriveFont(0.25f * WIDTH * 0.10f));
        }

        setLcdInfoFont(getModel().getStandardInfoFont().deriveFont(0.15f * WIDTH * 0.10f));

        CENTER.setLocation(getGaugeBounds().getCenterX() - getInsets().left, getGaugeBounds().getCenterY() - getInsets().top);

        if (frameImage != null) {
            frameImage.flush();
        }
        frameImage = create_FRAME_Image(WIDTH);

        if (backgroundImage != null) {
            backgroundImage.flush();
        }
        backgroundImage = create_BACKGROUND_Image(WIDTH);

        if (lcdImage != null) {
            lcdImage.flush();
        }
        lcdImage = create_LCD_Image((int) (WIDTH * 0.32), (int) (WIDTH * 0.10), getLcdColor(), getCustomLcdBackground());
        LCD.setRect(((getGaugeBounds().width - lcdImage.getWidth()) / 2.0), ((getGaugeBounds().height - lcdImage.getHeight()) / 2.0), WIDTH * 0.32, WIDTH * 0.10);

        if (tickmarksImage != null) {
            tickmarksImage.flush();
        }
        tickmarksImage = create_TICKMARKS_Image(WIDTH);

        if (overlayImage != null) {
            overlayImage.flush();
        }
        overlayImage = create_OVERLAY_Image(WIDTH);

        if (pointerImage != null) {
            pointerImage.flush();
        }
        pointerImage = create_POINTER_Image(WIDTH);

        if (foregroundImage != null) {
            foregroundImage.flush();
        }
        foregroundImage = create_FOREGROUND_Image(WIDTH, false, getForegroundType());

        if (disabledImage != null) {
            disabledImage.flush();
        }
        disabledImage = create_DISABLED_Image(WIDTH);

        return this;
    }
494671
public final void init(final int WIDTH, final int HEIGHT) {
        if (WIDTH <= 1 || HEIGHT <= 1) {
            return;
        }

        if (bgImage != null) {
            bgImage.flush();
        }

        if (lcdImage != null) {
            lcdImage.flush();
        }

        if (glowImageOn != null) {
            glowImageOn.flush();
        }
        glowImageOn = GlowImageFactory.INSTANCE.createLcdGlow(WIDTH, HEIGHT, glowColor, true);

        lcdImage = create_LCD_Image(WIDTH, HEIGHT, null);
        final double CORNER_RADIUS = WIDTH > HEIGHT ? (HEIGHT * 0.095) : (WIDTH * 0.095);
        disabledShape = new RoundRectangle2D.Double(0, 0, WIDTH, HEIGHT, CORNER_RADIUS, CORNER_RADIUS);
        if (isDigitalFont()) {
            lcdValueFont = LCD_DIGITAL_FONT.deriveFont(0.7f * getInnerBounds().height).deriveFont(Font.PLAIN);
            if (useCustomLcdUnitFont) {
                lcdUnitFont = customLcdUnitFont.deriveFont(0.2f * getInnerBounds().height);
            } else {
                lcdUnitFont = LCD_STANDARD_FONT.deriveFont(0.2f * getInnerBounds().height);
            }
        } else {
            lcdValueFont = LCD_STANDARD_FONT.deriveFont(0.625f * getInnerBounds().height);
            if (useCustomLcdUnitFont) {
                lcdUnitFont = customLcdUnitFont.deriveFont(0.2f * getInnerBounds().height);
            } else {
                lcdUnitFont = LCD_STANDARD_FONT.deriveFont(0.2f * getInnerBounds().height);
            }
        }
        lcdInfoFont = LCD_STANDARD_FONT.deriveFont(Font.BOLD, 0.18f * getInnerBounds().height);

        if (lcdThresholdImage != null) {
            lcdThresholdImage.flush();
        }
        lcdThresholdImage = create_LCD_THRESHOLD_Image((int) (HEIGHT * 0.2045454545), (int) (HEIGHT * 0.2045454545), lcdColor.TEXT_COLOR);

        if (!sections.isEmpty()) {
            sectionsBackground.clear();
            sectionsForeground.clear();

            final float[] HSB_START = (Color.RGBtoHSB(lcdColor.GRADIENT_START_COLOR.getRed(), lcdColor.GRADIENT_START_COLOR.getGreen(), lcdColor.GRADIENT_START_COLOR.getBlue(), null));
            final float[] HSB_FRACTION1 = (Color.RGBtoHSB(lcdColor.GRADIENT_FRACTION1_COLOR.getRed(), lcdColor.GRADIENT_FRACTION1_COLOR.getGreen(), lcdColor.GRADIENT_FRACTION1_COLOR.getBlue(), null));
            final float[] HSB_FRACTION2 = (Color.RGBtoHSB(lcdColor.GRADIENT_FRACTION2_COLOR.getRed(), lcdColor.GRADIENT_FRACTION2_COLOR.getGreen(), lcdColor.GRADIENT_FRACTION2_COLOR.getBlue(), null));
            final float[] HSB_FRACTION3 = (Color.RGBtoHSB(lcdColor.GRADIENT_FRACTION3_COLOR.getRed(), lcdColor.GRADIENT_FRACTION3_COLOR.getGreen(), lcdColor.GRADIENT_FRACTION3_COLOR.getBlue(), null));
            final float[] HSB_STOP = (Color.RGBtoHSB(lcdColor.GRADIENT_STOP_COLOR.getRed(), lcdColor.GRADIENT_STOP_COLOR.getGreen(), lcdColor.GRADIENT_STOP_COLOR.getBlue(), null));

            // Hue values of the gradient colors
            final float HUE_START = HSB_START[0];
            final float HUE_FRACTION1 = HSB_FRACTION1[0];
            final float HUE_FRACTION2 = HSB_FRACTION2[0];
            final float HUE_FRACTION3 = HSB_FRACTION3[0];
            final float HUE_STOP = HSB_STOP[0];

            // Brightness values of the gradient colors
            final float BRIGHTNESS_START = HSB_START[2];
            final float BRIGHTNESS_FRACTION1 = HSB_FRACTION1[2];
            final float BRIGHTNESS_FRACTION2 = HSB_FRACTION2[2];
            final float BRIGHTNESS_FRACTION3 = HSB_FRACTION3[2];
            final float BRIGHTNESS_STOP = HSB_STOP[2];

            for (Section section : sections) {
                final Color[] BACKGROUND_COLORS;
                final Color FOREGROUND_COLOR;
                final float[] HSB_SECTION = Color.RGBtoHSB(section.getColor().getRed(), section.getColor().getGreen(), section.getColor().getBlue(), null);
                final float HUE_SECTION = HSB_SECTION[0];
                final float SATURATION_SECTION = HSB_SECTION[1];
                final float BRIGHTNESS_SECTION = HSB_SECTION[2];
                if (!UTIL.isMonochrome(section.getColor())) {
                    // Section color is not monochrome
                    if (lcdColor == LcdColor.SECTIONS_LCD) {
                        BACKGROUND_COLORS = new Color[]{
                            new Color(Color.HSBtoRGB(HUE_SECTION, SATURATION_SECTION, BRIGHTNESS_START - 0.31f)),
                            new Color(Color.HSBtoRGB(HUE_SECTION, SATURATION_SECTION, BRIGHTNESS_FRACTION1 - 0.31f)),
                            new Color(Color.HSBtoRGB(HUE_SECTION, SATURATION_SECTION, BRIGHTNESS_FRACTION2 - 0.31f)),
                            new Color(Color.HSBtoRGB(HUE_SECTION, SATURATION_SECTION, BRIGHTNESS_FRACTION3 - 0.31f)),
                            new Color(Color.HSBtoRGB(HUE_SECTION, SATURATION_SECTION, BRIGHTNESS_STOP - 0.31f))
                        };
                    } else {
                        final float HUE_DIFF = HUE_SECTION - HUE_FRACTION3;
                        BACKGROUND_COLORS = new Color[]{
                            UTIL.setHue(lcdColor.GRADIENT_START_COLOR, (HUE_START + HUE_DIFF) % 360),
                            UTIL.setHue(lcdColor.GRADIENT_FRACTION1_COLOR, (HUE_FRACTION1 + HUE_DIFF) % 360),
                            UTIL.setHue(lcdColor.GRADIENT_FRACTION2_COLOR, (HUE_FRACTION2 + HUE_DIFF) % 360),
                            UTIL.setHue(lcdColor.GRADIENT_FRACTION3_COLOR, (HUE_FRACTION3 + HUE_DIFF) % 360),
                            UTIL.setHue(lcdColor.GRADIENT_STOP_COLOR, (HUE_STOP + HUE_DIFF) % 360)
                        };
                    }
                    FOREGROUND_COLOR = UTIL.setSaturationBrightness(section.getColor(), 0.57f, 0.83f);
                } else {
                    // Section color is monochrome
                    final float BRIGHTNESS_DIFF = BRIGHTNESS_SECTION - BRIGHTNESS_FRACTION1;

                    BACKGROUND_COLORS = new Color[]{
                        UTIL.setSaturationBrightness(lcdColor.GRADIENT_START_COLOR, 0, BRIGHTNESS_START + BRIGHTNESS_DIFF),
                        UTIL.setSaturationBrightness(lcdColor.GRADIENT_FRACTION1_COLOR, 0, BRIGHTNESS_FRACTION1 + BRIGHTNESS_DIFF),
                        UTIL.setSaturationBrightness(lcdColor.GRADIENT_FRACTION2_COLOR, 0, BRIGHTNESS_FRACTION2 + BRIGHTNESS_DIFF),
                        UTIL.setSaturationBrightness(lcdColor.GRADIENT_FRACTION3_COLOR, 0, BRIGHTNESS_FRACTION3 + BRIGHTNESS_DIFF),
                        UTIL.setSaturationBrightness(lcdColor.GRADIENT_STOP_COLOR, 0, BRIGHTNESS_STOP + BRIGHTNESS_DIFF)
                    };
                    if (UTIL.isDark(section.getColor())) {
                        FOREGROUND_COLOR = Color.WHITE;
                    } else {
                        FOREGROUND_COLOR = Color.BLACK;
                    }
                }
                sectionsBackground.add(create_LCD_Image(WIDTH, HEIGHT, BACKGROUND_COLORS));
                sectionsForeground.add(FOREGROUND_COLOR);
            }
        }

        // Quality overlay related parameters
        overlayCornerRadius = WIDTH > HEIGHT ? (HEIGHT * 0.095) - 1 : (WIDTH * 0.095) - 1;
        overlayFactor = (float) (lcdValue / (lcdMaxValue - lcdMinValue));
        if (Double.compare(overlayFactor, 1.0) > 0) {
            factor = 1.0f;
        } else if (Double.compare(overlayFactor, 0) < 0) {
            factor = 0.0f;
        } else {
            factor = overlayFactor;
        }
        overlayColors = new Color[] {
            UTIL.setAlpha(qualityOverlayLookup.getColorAt(factor), 0.5f),
            UTIL.setAlpha(qualityOverlayLookup.getColorAt(factor).darker(), 0.5f),
            UTIL.setAlpha(qualityOverlayLookup.getColorAt(factor), 0.5f)
        };
        final int INSET = (int) (qualityOverlay.getHeight() * 0.0909090909);
        overlayInsets.set(INSET, INSET, INSET, INSET);
        qualityOverlayLookup = new GradientWrapper(new Point2D.Double(overlayInsets.left, 0), new Point2D.Double(lcdImage.getMinX() + lcdImage.getWidth() - overlayInsets.right, 0), qualityOverlayFractions, qualityOverlayColors);
        qualityOverlayGradient = new LinearGradientPaint(new Point2D.Double(0, overlayInsets.top), new Point2D.Double(0, HEIGHT - overlayInsets.bottom), new float[]{0.0f, 0.5f, 1.0f}, overlayColors);
        qualityOverlay.setRoundRect(overlayInsets.left, overlayInsets.top, (INNER_BOUNDS.width * overlayFactor) - overlayInsets.left - overlayInsets.right, INNER_BOUNDS.height - overlayInsets.top - overlayInsets.bottom, overlayCornerRadius, overlayCornerRadius);

        // Prepare bargraph
        bargraphSegmentFactor = 20 / (lcdMaxValue - lcdMinValue);
        prepareBargraph(WIDTH, HEIGHT);
    }
303406
def _resize(self, width, height):
        '''
        
        '''
        self._dirty_size = width, height
        self.reset_canvas(width, height)
        self.draw()
        self._dirty_draw = True
501575
public function resize(int $width = 0, int $height = 0)
    {
        $this->instance->scaleImage($width, $height);
    }
1063027
def on_resize(self, event):
        """"""
        self.context.set_viewport(0, 0, event.size[0], event.size[1])
        for visual in self.visuals:
            visual.on_resize(event.size)
        self.update()
647242
@Override
	public void reshape(int width, int height) {
		if( this.width == width && this.height == height )
			return;
		if( isSubimage() )
			throw new IllegalArgumentException("Can't reshape sub-images");
		
		Object data = _getData();

		if( Array.getLength(data) < width*height ) {
			// declare a new larger image to store the data
			ImageGray a = createNew(width,height);
			_setData(a._getData());
		}

		this.stride = width;
		this.width = width;
		this.height = height;
	}
529444
public void setHeight(int height) {

        if (m_isFrame) {
            setParentHeight(height);
        } else {
            m_popup.setHeight(height);
            if (m_popup.isShowing()) {
                m_popup.center();
            }
        }
    }
26362
function( width, height ){

            var layer;
            proto.resize.call( this, width, height );

            for ( var id in this._layers ){

                layer = this._layers[ id ];
                if ( layer.options.autoResize ){
                    layer.el.width = this.width;
                    layer.el.height = this.height;
                }
            }

            return this;
        }
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()