@Test public void testToScreenCoordinates() { final Vector2 coordinates = new Vector2(); viewport.onResize(VIEWPORT_WIDTH, VIEWPORT_HEIGHT); coordinates.set(1f, 1f); viewport.toScreenCoordinates(coordinates); Assert.assertEquals(1f, coordinates.x, 0.001f); Assert.assertEquals(1f, coordinates.y, 0.001f); viewport.onResize(MathUtils.round(VIEWPORT_WIDTH * 1.5f), MathUtils.round(VIEWPORT_HEIGHT * 1.5f)); coordinates.set(1f, 1f); viewport.toScreenCoordinates(coordinates); Assert.assertEquals(1f, coordinates.x, 0.001f); Assert.assertEquals(1f, coordinates.y, 0.001f); viewport.onResize(VIEWPORT_WIDTH * 2, VIEWPORT_HEIGHT * 2); coordinates.set(1f, 1f); viewport.toScreenCoordinates(coordinates); Assert.assertEquals(1f, coordinates.x, 0.001f); Assert.assertEquals(1f, coordinates.y, 0.001f); }
@Override public void onResize(int width, int height) { setBounds(0, 0, width, height, 1f, 1f); }
ScreenViewport extends Viewport { @Override public void onResize(int width, int height) { setBounds(0, 0, width, height, 1f, 1f); } }
ScreenViewport extends Viewport { @Override public void onResize(int width, int height) { setBounds(0, 0, width, height, 1f, 1f); }  }
ScreenViewport extends Viewport { @Override public void onResize(int width, int height) { setBounds(0, 0, width, height, 1f, 1f); }  @Override void onResize(int width, int height); }
ScreenViewport extends Viewport { @Override public void onResize(int width, int height) { setBounds(0, 0, width, height, 1f, 1f); }  @Override void onResize(int width, int height);  }