Package arc.util.viewport
Class FitViewport
java.lang.Object
arc.util.viewport.Viewport
arc.util.viewport.ScalingViewport
arc.util.viewport.FitViewport
A ScalingViewport that uses
Scaling.fit
so it keeps the aspect ratio by scaling the world up to fit the screen, adding
black bars (letterboxing) for the remaining space.-
Constructor Summary
ConstructorDescriptionFitViewport
(float worldWidth, float worldHeight) Creates a new viewport using a newCamera
.FitViewport
(float worldWidth, float worldHeight, Camera camera) -
Method Summary
Methods inherited from class arc.util.viewport.ScalingViewport
getScaling, setScaling, update
Methods inherited from class arc.util.viewport.Viewport
apply, apply, calculateScissors, getBottomGutterHeight, getCamera, getLeftGutterWidth, getRightGutterWidth, getRightGutterX, getScreenHeight, getScreenWidth, getScreenX, getScreenY, getTopGutterHeight, getTopGutterY, getWorldHeight, getWorldWidth, project, setCamera, setScreenBounds, setScreenHeight, setScreenPosition, setScreenSize, setScreenWidth, setScreenX, setScreenY, setWorldHeight, setWorldSize, setWorldWidth, toScreenCoordinates, unproject, update
-
Constructor Details
-
FitViewport
public FitViewport(float worldWidth, float worldHeight) Creates a new viewport using a newCamera
. -
FitViewport
-