Class Resolution

java.lang.Object
de.gurkenlabs.litiengine.gui.screens.Resolution

public class Resolution extends Object
Represents the resolution of the game window consisting of the width and height and information about the ratio.

This class also provides access to predefined known resolutions of the different aspect ratios which can be used to set the resolution of the GameWindow.

See Also:
  • Method Details

    • custom

      public static Resolution custom(int width, int height, String resolutionName)
    • getHeight

      public int getHeight()
      Gets the height of this resolution.
      Returns:
      The height of the resolution.
    • getWidth

      public int getWidth()
      Gets the width of this resolution.
      Returns:
      The width of the resolution.
    • getDimension

      public Dimension getDimension()
      Gets the dimension of this resolution consisting of it's width and height.
      Returns:
      The dimension of the resolution.
    • toDimensionString

      public String toDimensionString()
    • toDimensionString

      public String toDimensionString(String delimiter)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getRatio

      public Resolution.Ratio getRatio()
      Gets the aspect ratio of this resolution.
      Returns:
      The aspect ratio of this resolution.