Enum EPromptImageObjectFit
- All Implemented Interfaces:
Serializable, Comparable<EPromptImageObjectFit>
The object-fit property defines how an image should be resized to fit its canvas.
- Since:
- 8.5.0
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe image is scaled to maintain its aspect ratio while fitting within the canvas box.The image is sized to maintain its aspect ratio while filling the entire canvas.The image is sized to fill the canvas.The image is not resized and centered within the canvas. -
Method Summary
Modifier and TypeMethodDescriptionstatic EPromptImageObjectFitReturns the enum constant of this type with the specified name.static EPromptImageObjectFit[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CONTAIN
The image is scaled to maintain its aspect ratio while fitting within the canvas box. The entire image is made to fill the canvas, while preserving its aspect ratio, so the image will be "letterboxed" or "pillarboxed" if its aspect ratio does not match the aspect ratio of the box. -
COVER
The image is sized to maintain its aspect ratio while filling the entire canvas. If the image's aspect ratio does not match the aspect ratio of its box, then the image will be clipped to fit. -
FILL
The image is sized to fill the canvas. The entire image will completely fill the box. If the image's aspect ratio does not match the aspect ratio of its canvas, then the image will be stretched to fit. -
NONE
The image is not resized and centered within the canvas. -
SCALE_DOWN
-
-
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
-