Enum Class ImageLayout
- All Implemented Interfaces:
Serializable,Comparable<ImageLayout>,Constable
指定图像如何拉伸以填充目标矩形的方式。
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic ImageLayoutReturns the enum constant of this class with the specified name.static ImageLayout[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
None
指定图像在目标矩形顶部左对齐。 -
Center
指定图像在目标矩形内居中。 -
Stretch
指定图像被调整大小以填充目标尺寸。宽高比不会被保持。 -
Zoom
指定图像在保持其原始宽高比的同时,被缩放以适应目标尺寸。 -
ZoomToFill
指定图像在保持其原始宽高比的同时,被缩放以填满目标尺寸。如果目标矩形的宽高比与源图像不同,则源内容将被裁剪以适应目标尺寸。 -
Tile
指定图像以平铺方式填充目标尺寸。
-
-
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
-