Package rendering

Class Resolution

java.lang.Object
rendering.Resolution

public class Resolution
extends java.lang.Object
Represents the resolution of an image. That is some number of pixels by some number of pixels.
  • Field Summary

    Fields
    Modifier and Type Field Description
    int columns
    The number of pixels in the width of the resolution.
    int rows
    The number of pixels in the height of the resolution.
  • Constructor Summary

    Constructors
    Constructor Description
    Resolution​(int columns, int rows)
    Construct a resolution x by y pixels.
    Resolution​(java.lang.String resolution)
    Construct a resolution from a string, such as "1920x1080".
  • Method Summary

    Modifier and Type Method Description
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • columns

      public final int columns
      The number of pixels in the width of the resolution.
    • rows

      public final int rows
      The number of pixels in the height of the resolution.
  • Constructor Details

    • Resolution

      public Resolution​(int columns, int rows)
      Construct a resolution x by y pixels.
      Parameters:
      columns - The number of pixels in the resolution's width.
      rows - The number of pixels in the resolution's height.
    • Resolution

      public Resolution​(java.lang.String resolution)
      Construct a resolution from a string, such as "1920x1080".
      Parameters:
      resolution - The string representation of the resolution.
  • Method Details

    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object