Sets this scene's size (width and height) in pixels.

@param wide
@param high
@return this Scene
325721
public final Scene setPixelSize(final int wide, final int high)
    {
        m_wide = wide;

        m_high = high;

        getElement().getStyle().setWidth(wide, Unit.PX);

        getElement().getStyle().setHeight(high, Unit.PX);

        final NFastArrayList<Layer> layers = getChildNodes();

        if (null != layers)
        {
            final int size = layers.size();

            for (int i = 0; i < size; i++)
            {
                final Layer layer = layers.get(i);

                if (null != layer)
                {
                    layer.setPixelSize(wide, high);
                }
            }
        }
        return this;
    }
140481
public void setPixelSize(int width, int height) {
		layerHtmlContainer.setPixelSize(width, height);
		drawingArea.setWidth(width);
		drawingArea.setHeight(height);
		canvasPanel.setPixelSize(width, height);
		for (CanvasContainer container : worldCanvases) {
			container.setPixelSize(width, height);
		}
		super.setPixelSize(width, height);
	}
797434
public void configure( int width , int height , int gridRows , int gridCols ) {

		// need to maintain the same ratio of pixels in the grid as in the regular image for similarity and rigid
		// to work correctly
		int s = Math.max(width,height);
		scaleX = s/(float)(gridCols-1);
		scaleY = s/(float)(gridRows-1);
		if( gridRows > gridCols ) {
			scaleY /= (gridCols-1)/ (float) (gridRows-1);
		} else {
			scaleX /= (gridRows-1)/ (float) (gridCols-1);
		}

		this.gridRows = gridRows;
		this.gridCols = gridCols;

		grid.resize(gridCols*gridRows);
		reset();
	}
131593
function(width, height){
            this.map.setSize(width, height);
            this.player.fov.setSize(width, height);
            this.entityManager.setSize(width, height);
            this.lighting.setSize(width, height);
        }
678783
public EGLSurface createOffscreenSurface(int width, int height) {
        int[] surfaceAttribs = {
                EGL14.EGL_WIDTH, width,
                EGL14.EGL_HEIGHT, height,
                EGL14.EGL_NONE
        };
        EGLSurface eglSurface = EGL14.eglCreatePbufferSurface(mEGLDisplay, mEGLConfig,
                surfaceAttribs, 0);
        checkEglError("eglCreatePbufferSurface");
        if (eglSurface == null) {
            throw new RuntimeException("surface was null");
        }
        return eglSurface;
    }
461821
public Cell<C,T> maxSize (Value<C,T> size) {
		maxWidth = size;
		maxHeight = size;
		return this;
	}
295277
private BufferedImage create_HI_INDICATOR_Image(final int WIDTH) {
        if (WIDTH <= 0) {
            return null;
        }

        // Define the size of the indicator
        int indicatorSize = (int) (0.015 * WIDTH);
        if (indicatorSize < 4) {
            indicatorSize = 4;
        }
        if (indicatorSize > 8) {
            indicatorSize = 8;
        }

        final BufferedImage IMAGE = UTIL.createImage(indicatorSize, indicatorSize, Transparency.TRANSLUCENT);
        final Graphics2D G2 = IMAGE.createGraphics();
        G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        G2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
        G2.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
        G2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
        G2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
        G2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
        G2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);

        final int IMAGE_WIDTH = IMAGE.getWidth();
        final int IMAGE_HEIGHT = IMAGE.getHeight();

        final GeneralPath THRESHOLD_TRIANGLE = new GeneralPath();
        THRESHOLD_TRIANGLE.setWindingRule(Path2D.WIND_EVEN_ODD);
        THRESHOLD_TRIANGLE.moveTo(IMAGE_WIDTH * 0.5, 0);
        THRESHOLD_TRIANGLE.lineTo(0, IMAGE_HEIGHT);
        THRESHOLD_TRIANGLE.lineTo(IMAGE_WIDTH, IMAGE_HEIGHT);
        THRESHOLD_TRIANGLE.lineTo(IMAGE_WIDTH * 0.5, 0);
        THRESHOLD_TRIANGLE.closePath();
        final Point2D THRESHOLD_TRIANGLE_START = new Point2D.Double(0, THRESHOLD_TRIANGLE.getBounds2D().getMinY());
        final Point2D THRESHOLD_TRIANGLE_STOP = new Point2D.Double(0, THRESHOLD_TRIANGLE.getBounds2D().getMaxY());
        final float[] THRESHOLD_TRIANGLE_FRACTIONS = {
            0.0f,
            0.3f,
            0.59f,
            1.0f
        };
        final Color[] THRESHOLD_TRIANGLE_COLORS = {
            new Color(82, 0, 0, 255),
            new Color(252, 29, 0, 255),
            new Color(252, 29, 0, 255),
            new Color(82, 0, 0, 255)
        };
        final LinearGradientPaint THRESHOLD_TRIANGLE_GRADIENT = new LinearGradientPaint(THRESHOLD_TRIANGLE_START, THRESHOLD_TRIANGLE_STOP, THRESHOLD_TRIANGLE_FRACTIONS, THRESHOLD_TRIANGLE_COLORS);
        G2.setPaint(THRESHOLD_TRIANGLE_GRADIENT);
        G2.fill(THRESHOLD_TRIANGLE);
        G2.setColor(Color.RED);
        G2.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
        G2.draw(THRESHOLD_TRIANGLE);

        G2.dispose();

        return IMAGE;
    }
999454
public synchronized static Bitmap load(InputStream is, int width, int height) {
        BitmapFactory.Options opt = null;
        try {
            opt = new BitmapFactory.Options();
            if (width > 0 && height > 0) {
                if (is.markSupported()) {
                    is.mark(is.available());

                    opt.inJustDecodeBounds = true;
                    BitmapFactory.decodeStream(is, null, opt);
                    opt.inSampleSize = calculateInSampleSize(opt, width, height);
                    is.reset();
                }
            }

            opt.inJustDecodeBounds = false;
            opt.inPurgeable = true;
            opt.inInputShareable = true;

            return BitmapFactory.decodeStream(new FlushedInputStream(is), null, opt);
        } catch (Exception e) {
            Log.e(TAG, "", e);
            return null;
        } finally {
            if (is != null) {
                try {
                    is.close();
                } catch (IOException e) {
                    System.out.print(e.toString());
                }
            }
            opt = null;
        }
    }
872612
public void setCanvasWidthHeight(int width, int height) {
        hudWidth = width;
        hudHeight = height;
        HUD = Bitmap.createBitmap(width, height, Config.ARGB_8888);
        canvas = new Canvas(HUD);
        texture = null;
    }
784071
function(size) {
        OpenLayers.Renderer.prototype.setSize.apply(this, arguments);
        
        this.rendererRoot.setAttributeNS(null, "width", this.size.w);
        this.rendererRoot.setAttributeNS(null, "height", this.size.h);
    }
536324
void setDimens(int width, int height) {
        mAreDimensOverridden = true;
        mDesiredWidth = width;
        mDesiredHeight = height;
        requestLayout();
    }
937326
public static final void setSize(UIObject o, Rect size) {
        o.setPixelSize(size.w, size.h);

    }
1347582
private void setWidth(int width) {
        contentParams.width = options.fullScreenPeek() ? screenWidth : width;
        content.setLayoutParams(contentParams);
    }
854398
public static double selectZoomToShowAll(JComponent panel , int width , int height ) {
		int w = panel.getWidth();
		int h = panel.getHeight();
		if( w == 0 ) {
			w = panel.getPreferredSize().width;
			h = panel.getPreferredSize().height;
		}

		double scale = Math.max(width/(double)w,height/(double)h);
		if( scale > 1.0 ) {
			return 1.0/scale;
		} else {
			return 1.0;
		}
	}
467806
private int setViewSize(int mode, int size, int drawableWidth) {
        int viewSize;
        switch (mode) {
            case MeasureSpec.EXACTLY:
                viewSize = size;
                break;

            case MeasureSpec.AT_MOST:
                viewSize = Math.min(drawableWidth, size);
                break;

            case MeasureSpec.UNSPECIFIED:
                viewSize = drawableWidth;
                break;

            default:
                viewSize = size;
                break;
        }
        return viewSize;
    }
623571
public Cell<C,T> prefSize (Value<C,T> width, Value<C,T> height) {
		prefWidth = width;
		prefHeight = height;
		return this;
	}
1245342
public Cell<C,T> maxSize (float width, float height) {
		maxWidth = new FixedValue<C, T>(layout.toolkit,width);
		maxHeight = new FixedValue<C, T>(layout.toolkit,height);
		return this;
	}