Package com.badlogic.gdx.utils.viewport
Class StretchViewport
- java.lang.Object
-
- com.badlogic.gdx.utils.viewport.Viewport
-
- com.badlogic.gdx.utils.viewport.ScalingViewport
-
- com.badlogic.gdx.utils.viewport.StretchViewport
-
public class StretchViewport extends ScalingViewport
A ScalingViewport that usesScaling.stretch
so it does not keep the aspect ratio, the world is scaled to take the whole screen.
-
-
Constructor Summary
Constructors Constructor Description StretchViewport(float worldWidth, float worldHeight)
Creates a new viewport using a newOrthographicCamera
.StretchViewport(float worldWidth, float worldHeight, Camera camera)
-
Method Summary
-
Methods inherited from class com.badlogic.gdx.utils.viewport.ScalingViewport
getScaling, setScaling, update
-
Methods inherited from class com.badlogic.gdx.utils.viewport.Viewport
apply, apply, calculateScissors, getBottomGutterHeight, getCamera, getLeftGutterWidth, getPickRay, getRightGutterWidth, getRightGutterX, getScreenHeight, getScreenWidth, getScreenX, getScreenY, getTopGutterHeight, getTopGutterY, getWorldHeight, getWorldWidth, project, project, setCamera, setScreenBounds, setScreenHeight, setScreenPosition, setScreenSize, setScreenWidth, setScreenX, setScreenY, setWorldHeight, setWorldSize, setWorldWidth, toScreenCoordinates, unproject, unproject, update
-
-
-
-
Constructor Detail
-
StretchViewport
public StretchViewport(float worldWidth, float worldHeight)
Creates a new viewport using a newOrthographicCamera
.
-
StretchViewport
public StretchViewport(float worldWidth, float worldHeight, Camera camera)
-
-