Code example for Point

Methods: getSize

0
        Bitmap frameBuffer = Bitmap.createBitmap(frameBufferWidth,
                frameBufferHeight, Config.RGB_565);
         
        float width = 0, height = 0;
         
    	Point point = new Point();
    	getWindowManager().getDefaultDisplay().getSize(point);
    	width = point.x;
    	height = point.y;
         
        float scaleX = (float) frameBufferWidth
                / width;
        float scaleY = (float) frameBufferHeight
                / height;
 
        renderView = new AndroidFastRenderView(this, frameBuffer);
        graphics = new AndroidGraphics(getAssets(), frameBuffer);
        fileIO = new AndroidFileIO(this);
        audio = new AndroidAudio(this);
        input = new AndroidInput(this, renderView, scaleX, scaleY);
Experience pair programming with AI  Get Codota for Java