Enum Class PixmapRatioMode

java.lang.Object
java.lang.Enum<PixmapRatioMode>
org.refcodes.textual.PixmapRatioMode
All Implemented Interfaces:
Serializable, Comparable<PixmapRatioMode>, Constable

public enum PixmapRatioMode extends Enum<PixmapRatioMode>
The pixmap scale mode specifies how an algorithm will scale a Pixmap for proper display with text (character) e.g. when printing an RgbPixmap on the console with ASCII_HEADER_ASCII_BODY art using the AsciiArtBuilder.
  • Enum Constant Details

    • NONE

      public static final PixmapRatioMode NONE
      The pixmap will not be scaled at all.
    • ONE_HALF

      public static final PixmapRatioMode ONE_HALF
      The width to height ration is one to one half (1:1/2).
    • TWO_THIRDS

      public static final PixmapRatioMode TWO_THIRDS
      The width to height ration is one to two thirds (1:2/3).
    • THREE_QUARTERS

      public static final PixmapRatioMode THREE_QUARTERS
      The width to height ration is one to three quarters (1:3/4).
    • CONSOLE

      public static final PixmapRatioMode CONSOLE
      The width to height ration is adjusted to look good on a console / terminal.
  • Method Details

    • values

      public static PixmapRatioMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PixmapRatioMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getRatio

      public float getRatio()
      Gets the ratio.
      Returns:
      the ratio