- All Implemented Interfaces:
Serializable
,Comparable<PixmapRatioMode>
,Constable
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 ConstantDescriptionThe width to height ration is adjusted to look good on a console / terminal.The pixmap will not be scaled at all.The width to height ration is one to one half (1:1/2).The width to height ration is one to three quarters (1:3/4).The width to height ration is one to two thirds (1:2/3). -
Method Summary
Modifier and TypeMethodDescriptionfloat
getRatio()
Gets the ratio.static PixmapRatioMode
Returns the enum constant of this class with the specified name.static PixmapRatioMode[]
values()
Returns an array containing the constants of this enum class, 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 class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
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 nameNullPointerException
- if the argument is null
-
getRatio
public float getRatio()Gets the ratio.- Returns:
- the ratio
-