Enum PixmapRatioMode



  • public enum PixmapRatioMode
    extends java.lang.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 art using the AsciiArtBuilder.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CONSOLE
      The width to height ration is adjusted to look good on a console / terminal.
      NONE
      The pixmap will not be scaled at all.
      ONE_HALF
      The width to height ration is one to one half (1:1/2).
      THREE_QUARTERS
      The width to height ration is one to three quarters (1:3/4).
      TWO_THIRDS
      The width to height ration is one to two thirds (1:2/3).
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float getRatio​()
      Gets the ratio.
      static PixmapRatioMode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static PixmapRatioMode[] values​()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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 Detail

      • values

        public static PixmapRatioMode[] values​()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PixmapRatioMode c : PixmapRatioMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PixmapRatioMode valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getRatio

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