| Package | Description |
|---|---|
| com.badlogic.gdx.scenes.scene2d | |
| com.badlogic.gdx.utils.viewport |
| Modifier and Type | Method and Description |
|---|---|
Viewport |
Stage.getViewport() |
| Modifier and Type | Method and Description |
|---|---|
void |
Stage.setViewport(Viewport viewport) |
| Constructor and Description |
|---|
Stage(Viewport viewport)
Creates a stage with the specified viewport.
|
Stage(Viewport viewport,
Batch batch)
Creates a stage with the specified viewport and batch.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ExtendViewport
A viewport that keeps the world aspect ratio by extending the world in one direction.
|
class |
FillViewport
A ScalingViewport that uses
Scaling.fill so it keeps the aspect ratio by scaling the world up to take the whole screen
(some of the world may be off screen). |
class |
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. |
class |
ScalingViewport
A viewport that scales the world using
Scaling. |
class |
ScreenViewport
A viewport where the world size is based on the size of the screen.
|
class |
StretchViewport
A ScalingViewport that uses
Scaling.stretch so it does not keep the aspect ratio, the world is scaled to take the whole
screen. |