Scaling#fit, then the shorter dimension is lengthened to fill the viewport. Other
scaling, such as Scaling#contain, may lengthen the world in both directions. A maximum size can be specified to limit
how much the world is extended and black bars (letterboxing) are used for any remaining space.
| Modifier and Type | Field and Description |
|---|---|
| private float | |
| private float | |
| private float | |
| private float | |
| private Scaling |
| Access | Constructor and Description |
|---|---|
| public | ExtendViewport(float minWorldWidth, float minWorldHeight)
Creates a new viewport using a new |
| public | ExtendViewport(float minWorldWidth, float minWorldHeight, Camera camera)
Creates a new viewport with no maximum world size. |
| public | ExtendViewport(float minWorldWidth, float minWorldHeight, float maxWorldWidth, float maxWorldHeight)
Creates a new viewport using a new |
| public | ExtendViewport(float minWorldWidth, float minWorldHeight, float
User 0 for no maximum width. maxWorldWidth, float User 0 for no maximum height. maxWorldHeight, Camera camera)Creates a new viewport with a maximum world size. |
| Modifier and Type | Method and Description |
|---|---|
| public float | |
| public float | |
| public float | |
| public float | |
| public void | |
| public void | |
| public void | |
| public void | |
| 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 |
| maxWorldHeight | back to summary |
|---|---|
| private float maxWorldHeight | |
| maxWorldWidth | back to summary |
|---|---|
| private float maxWorldWidth | |
| minWorldHeight | back to summary |
|---|---|
| private float minWorldHeight | |
| minWorldWidth | back to summary |
|---|---|
| private float minWorldWidth | |
| scaling | back to summary |
|---|---|
| private Scaling scaling | |
| ExtendViewport | back to summary |
|---|---|
| public ExtendViewport(float minWorldWidth, float minWorldHeight) Creates a new viewport using a new | |
| ExtendViewport | back to summary |
|---|---|
| public ExtendViewport(float minWorldWidth, float minWorldHeight, Camera camera) Creates a new viewport with no maximum world size. | |
| ExtendViewport | back to summary |
|---|---|
| public ExtendViewport(float minWorldWidth, float minWorldHeight, float maxWorldWidth, float maxWorldHeight) Creates a new viewport using a new | |
| ExtendViewport | back to summary |
|---|---|
| public ExtendViewport(float minWorldWidth, float minWorldHeight, float maxWorldWidth, float maxWorldHeight, Camera camera) Creates a new viewport with a maximum world size.
| |
| getMaxWorldHeight | back to summary |
|---|---|
| public float getMaxWorldHeight() | |
| getMaxWorldWidth | back to summary |
|---|---|
| public float getMaxWorldWidth() | |
| getMinWorldHeight | back to summary |
|---|---|
| public float getMinWorldHeight() | |
| getMinWorldWidth | back to summary |
|---|---|
| public float getMinWorldWidth() | |
| setMaxWorldHeight | back to summary |
|---|---|
| public void setMaxWorldHeight(float maxWorldHeight) | |
| setMaxWorldWidth | back to summary |
|---|---|
| public void setMaxWorldWidth(float maxWorldWidth) | |
| setMinWorldHeight | back to summary |
|---|---|
| public void setMinWorldHeight(float minWorldHeight) | |
| setMinWorldWidth | back to summary |
|---|---|
| public void setMinWorldWidth(float minWorldWidth) | |
| 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 | |