Package squidpony.squidgrid.gui.gdx
Class ShrinkPartViewport
java.lang.Object
com.badlogic.gdx.utils.viewport.Viewport
com.badlogic.gdx.utils.viewport.ScalingViewport
squidpony.squidgrid.gui.gdx.ShrinkPartViewport
public class ShrinkPartViewport extends com.badlogic.gdx.utils.viewport.ScalingViewport
A viewport that scales the world using
Scaling.stretch
on a sub-region of the screen.
Does not keep the aspect ratio, the world is scaled to take up the requested region of the screen.- Author:
- Daniel Holderbaum, Nathan Sweet Created by Tommy Ettinger on 4/16/2016.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ShrinkPartViewport(float worldWidth, float worldHeight, float barWidth)
Creates a new viewport using a newOrthographicCamera
.ShrinkPartViewport(float worldWidth, float worldHeight, float barWidth, float barHeight)
ShrinkPartViewport(float worldWidth, float worldHeight, float barWidth, float barHeight, com.badlogic.gdx.graphics.Camera camera)
ShrinkPartViewport(float worldWidth, float worldHeight, float barWidth, com.badlogic.gdx.graphics.Camera camera)
-
Method Summary
Modifier and Type Method Description com.badlogic.gdx.utils.Scaling
getScaling()
void
update(int screenWidth, int screenHeight, boolean centerCamera)
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
-
Field Details
-
Constructor Details
-
ShrinkPartViewport
Creates a new viewport using a newOrthographicCamera
. -
ShrinkPartViewport
-
ShrinkPartViewport
public ShrinkPartViewport(float worldWidth, float worldHeight, float barWidth, com.badlogic.gdx.graphics.Camera camera) -
ShrinkPartViewport
public ShrinkPartViewport(float worldWidth, float worldHeight, float barWidth, float barHeight, com.badlogic.gdx.graphics.Camera camera)
-
-
Method Details
-
update
- Overrides:
update
in classcom.badlogic.gdx.utils.viewport.ScalingViewport
-
getScaling
- Overrides:
getScaling
in classcom.badlogic.gdx.utils.viewport.ScalingViewport
-