Enum Class Orientation
- All Implemented Interfaces:
Serializable
,Comparable<Orientation>
,Constable
Image orientation.
This is used to support images with orientations that differ from those
of their pixel data. It aligns with the TIFF/EXIF Orientation
tag,
but it currently supports only rotation and not flipping.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo rotation.The image is rotated 180 degrees.The image is rotated counter-clockwise (or, the view is rotated clockwise) 270 degrees.The image is rotated counter-clockwise (or, the view is rotated clockwise) 90 degrees. -
Method Summary
Modifier and TypeMethodDescriptionadjustedSize
(Size size) int
degrees()
static Orientation
forTIFFOrientation
(int value) int
static Orientation
Returns the enum constant of this class with the specified name.static Orientation[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ROTATE_0
No rotation. (TIFFOrientation
value 1) -
ROTATE_90
The image is rotated counter-clockwise (or, the view is rotated clockwise) 90 degrees. Orienting it will require rotating it 90 degrees clockwise. (TIFFOrientation
value 6; "right top") -
ROTATE_180
The image is rotated 180 degrees. (TIFFOrientation
value 3; "bottom right") -
ROTATE_270
The image is rotated counter-clockwise (or, the view is rotated clockwise) 270 degrees. Orienting it will require rotating it 90 degrees counter-clockwise. (TIFF Orientation value 8; "left bottom")
-
-
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
-
forTIFFOrientation
- Parameters:
value
- TIFF/EXIFOrientation
tag value.- Returns:
- Orientation corresponding to the given tag value.
- Throws:
IllegalArgumentException
- if the value is not supported.
-
adjustedSize
-
degrees
public int degrees() -
tiffValue
public int tiffValue()
-