Enum EPromptImageObjectFit
- java.lang.Object
-
- java.lang.Enum<EPromptImageObjectFit>
-
- de.xima.fc.prompt.service.support.EPromptImageObjectFit
-
- All Implemented Interfaces:
Serializable,Comparable<EPromptImageObjectFit>
public enum EPromptImageObjectFit extends Enum<EPromptImageObjectFit>
The object-fit property defines how an image should be resized to fit its canvas.- Since:
- 8.5.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONTAINThe image is scaled to maintain its aspect ratio while fitting within the canvas box.COVERThe image is sized to maintain its aspect ratio while filling the entire canvas.FILLThe image is sized to fill the canvas.NONEThe image is not resized and centered within the canvas.SCALE_DOWN
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EPromptImageObjectFitvalueOf(String name)Returns 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 Detail
-
CONTAIN
public static final EPromptImageObjectFit 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
public static final EPromptImageObjectFit 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
public static final EPromptImageObjectFit 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
public static final EPromptImageObjectFit NONE
The image is not resized and centered within the canvas.
-
SCALE_DOWN
public static final EPromptImageObjectFit SCALE_DOWN
-
-
Method Detail
-
values
public static EPromptImageObjectFit[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EPromptImageObjectFit c : EPromptImageObjectFit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EPromptImageObjectFit valueOf(String name)
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
-
-