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

    Fields 
    Modifier and Type Field Description
    float barHeight  
    float barWidth  
  • Constructor Summary

    Constructors 
    Constructor Description
    ShrinkPartViewport​(float worldWidth, float worldHeight, float barWidth)
    Creates a new viewport using a new OrthographicCamera.
    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.ScalingViewport

    setScaling

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait