Class CommonAspectRatio
java.lang.Object
de.xima.fc.prompt.service.support.CommonAspectRatio
Enumeration for common types of aspect ratios. Certain task types such as image generation produce image files. Some
prompt services allow the user to select the aspect ratio of that image file. Implementations are encouraged to use
these constants to increase interoperability between different prompt service implementations, but are not required
to do so.
- Since:
- 8.5.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAspect ratio 1:1 (portrait), i.e. width/height = 1.static final StringAspect ratio 16:9 (landscape), i.e. width/height = 16/9.static final StringAspect ratio 18:43 (portrait), i.e. width/height = 18/43.static final StringAspect ratio 2:3 (portrait), i.e. width/height = 2/3.static final StringAspect ratio 21:9 (landscape), i.e. width/height = 21/9.static final StringAspect ratio 27:64, i.e. width/height = 27/64.static final StringAspect ratio 3:2 (landscape), i.e. width/height = 3/2.static final StringAspect ratio 3:4 (portrait), i.e. width/height = 3/4.static final StringAspect ratio 4:3 (landscape), i.e. width/height = 4/3.static final StringAspect ratio 43:18 (landscape), i.e. width/height = 43/18.static final StringAspect ratio 64:27 (landscape), i.e. width/height = 64/27.static final StringAspect ratio 9:16 (portrait), i.e. width/height = 9/16.static final StringAspect ratio 9:21 (portrait), i.e. width/height = 9/21. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringlocalizedDescription(Locale locale, String commonAspectRatio) Gets the localized description for the given common aspect ratio.static StringlocalizedLabel(Locale locale, String commonAspectRatio) Gets the localized label for the given common aspect ratio.
-
Field Details
-
RATIO_16_9
Aspect ratio 16:9 (landscape), i.e. width/height = 16/9.- See Also:
-
RATIO_1_1
-
RATIO_27_64
Aspect ratio 27:64, i.e. width/height = 27/64. Sometimes also referred to as "9:21" (an approximation).- See Also:
-
RATIO_2_3
Aspect ratio 2:3 (portrait), i.e. width/height = 2/3.- See Also:
-
RATIO_3_2
Aspect ratio 3:2 (landscape), i.e. width/height = 3/2.- See Also:
-
RATIO_3_4
Aspect ratio 3:4 (portrait), i.e. width/height = 3/4.- See Also:
-
RATIO_4_3
Aspect ratio 4:3 (landscape), i.e. width/height = 4/3.- See Also:
-
RATIO_43_18
Aspect ratio 43:18 (landscape), i.e. width/height = 43/18.- See Also:
-
RATIO_18_43
Aspect ratio 18:43 (portrait), i.e. width/height = 18/43.- See Also:
-
RATIO_21_9
Aspect ratio 21:9 (landscape), i.e. width/height = 21/9.- See Also:
-
RATIO_9_21
Aspect ratio 9:21 (portrait), i.e. width/height = 9/21.- See Also:
-
RATIO_64_27
Aspect ratio 64:27 (landscape), i.e. width/height = 64/27. Sometimes also referred to as "21:9" (an approximation).- See Also:
-
RATIO_9_16
Aspect ratio 9:16 (portrait), i.e. width/height = 9/16.- See Also:
-
-
Method Details
-
localizedDescription
Gets the localized description for the given common aspect ratio. The value should be one of the constants defined in this class. When an unknown value is given, returns an implementation-defined default description.- Parameters:
locale- The locale for which to localize the description.commonAspectRatio- The common aspect ratio constant, must be one of the constants defined in this class.- Returns:
- The localized description for the given common aspect ratio.
-
localizedLabel
Gets the localized label for the given common aspect ratio. The value should be one of the constants defined in this class. When an unknown value is given, returns an implementation-defined default label.- Parameters:
locale- The locale for which to localize the label.commonAspectRatio- The common aspect ratio constant, must be one of the constants defined in this class.- Returns:
- The localized label for the given common aspect ratio.
-