- All Implemented Interfaces:
Serializable
,Comparable<PixmapRatioMode>
,java.lang.constant.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
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
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
Modifier and Type Method Description float
getRatio()
Gets the ratio.static PixmapRatioMode
valueOf(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.
-
Enum Constant Details
-
NONE
The pixmap will not be scaled at all. -
ONE_HALF
The width to height ration is one to one half (1:1/2). -
TWO_THIRDS
The width to height ration is one to two thirds (1:2/3). -
THREE_QUARTERS
The width to height ration is one to three quarters (1:3/4). -
CONSOLE
The width to height ration is adjusted to look good on a console / terminal.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getRatio
public float getRatio()Gets the ratio.- Returns:
- the ratio
-