Class GUI.Viewport

java.lang.Object
com.blackrook.gui.GUI.Viewport
Enclosing class:
GUI

public static class GUI.Viewport extends Object
A viewport "camera" that describes how or what is displayed of the GUI.

This affects what is visible on screen as well as how to render it in the canvas.

REMEMBER: In GUIs, (0,0) is upper left.

Author:
Matthew Tropiano
  • Constructor Details

    • Viewport

      public Viewport(float guiX, float guiY, float guiWidth, float guiHeight)
      Creates a new GUI viewport.
      Parameters:
      guiX - GUI Origin X-coordinate (in GUI coordinates).
      guiY - GUI Origin Y-coordinate (in GUI coordinates).
      guiWidth - GUI Viewport width (in GUI coordinates).
      guiHeight - GUI Viewport width (in GUI coordinates).
  • Method Details

    • setBounds

      public void setBounds(float guiX, float guiY, float guiWidth, float guiHeight)
    • getGUIX

      public float getGUIX()
    • setGUIX

      public void setGUIX(float guiX)
    • getGUIY

      public float getGUIY()
    • setGUIY

      public void setGUIY(float guiY)
    • getGUIWidth

      public float getGUIWidth()
    • setGUIWidth

      public void setGUIWidth(float guiWidth)
    • getGUIHeight

      public float getGUIHeight()
    • setGUIHeight

      public void setGUIHeight(float guiHeight)