Scaling.
Scaling#fit keeps the aspect ratio by scaling the world up to fit the screen, adding black bars (letterboxing) for the
remaining space.
Scaling#fill keeps the aspect ratio by scaling the world up to take the whole screen (some of the world may be off
screen).
Scaling#stretch does not keep the aspect ratio, the world is scaled to take the whole screen.
Scaling#none keeps the aspect ratio by using a fixed size world (the world may not fill the screen or some of the world
may be off screen).
| Access | Constructor and Description |
|---|---|
| public | ScalingViewport(Scaling scaling, float worldWidth, float worldHeight)
Creates a new viewport using a new |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Scaling | |
| public void | |
| public void | update(int screenWidth, int screenHeight, boolean centerCamera)
Overrides com. Configures this viewport's screen bounds using the specified screen size and calls |
| scaling | back to summary |
|---|---|
| private Scaling scaling | |
| ScalingViewport | back to summary |
|---|---|
| public ScalingViewport(Scaling scaling, float worldWidth, float worldHeight) Creates a new viewport using a new | |
| ScalingViewport | back to summary |
|---|---|
| public ScalingViewport(Scaling scaling, float worldWidth, float worldHeight, Camera camera) | |
| getScaling | back to summary |
|---|---|
| public Scaling getScaling() | |
| setScaling | back to summary |
|---|---|
| public void setScaling(Scaling scaling) | |
| update | back to summary |
|---|---|
| public void update(int screenWidth, int screenHeight, boolean centerCamera) Overrides com. Doc from com. Configures this viewport's screen bounds using the specified screen size and calls
The default implementation only calls | |