Class CommonAspectRatio
- java.lang.Object
-
- de.xima.fc.prompt.service.support.CommonAspectRatio
-
public final class CommonAspectRatio extends Object
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:
IPromptQueryConfig_AspectRatio
-
-
Field Summary
Fields Modifier and Type Field Description static StringRATIO_1_1Aspect ratio 1:1 (portrait), i.e. width/height = 1.static StringRATIO_16_9Aspect ratio 16:9 (landscape), i.e. width/height = 16/9.static StringRATIO_18_43Aspect ratio 18:43 (portrait), i.e. width/height = 18/43.static StringRATIO_2_3Aspect ratio 2:3 (portrait), i.e. width/height = 2/3.static StringRATIO_21_9Aspect ratio 21:9 (landscape), i.e. width/height = 21/9.static StringRATIO_27_64Aspect ratio 27:64, i.e. width/height = 27/64.static StringRATIO_3_2Aspect ratio 3:2 (landscape), i.e. width/height = 3/2.static StringRATIO_3_4Aspect ratio 3:4 (portrait), i.e. width/height = 3/4.static StringRATIO_4_3Aspect ratio 4:3 (landscape), i.e. width/height = 4/3.static StringRATIO_43_18Aspect ratio 43:18 (landscape), i.e. width/height = 43/18.static StringRATIO_64_27Aspect ratio 64:27 (landscape), i.e. width/height = 64/27.static StringRATIO_9_16Aspect ratio 9:16 (portrait), i.e. width/height = 9/16.static StringRATIO_9_21Aspect ratio 9:21 (portrait), i.e. width/height = 9/21.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
RATIO_16_9
public static final String RATIO_16_9
Aspect ratio 16:9 (landscape), i.e. width/height = 16/9.- See Also:
- Constant Field Values
-
RATIO_1_1
public static final String RATIO_1_1
Aspect ratio 1:1 (portrait), i.e. width/height = 1.- See Also:
- Constant Field Values
-
RATIO_27_64
public static final String RATIO_27_64
Aspect ratio 27:64, i.e. width/height = 27/64. Sometimes also referred to as "9:21" (an approximation).- See Also:
- Constant Field Values
-
RATIO_2_3
public static final String RATIO_2_3
Aspect ratio 2:3 (portrait), i.e. width/height = 2/3.- See Also:
- Constant Field Values
-
RATIO_3_2
public static final String RATIO_3_2
Aspect ratio 3:2 (landscape), i.e. width/height = 3/2.- See Also:
- Constant Field Values
-
RATIO_3_4
public static final String RATIO_3_4
Aspect ratio 3:4 (portrait), i.e. width/height = 3/4.- See Also:
- Constant Field Values
-
RATIO_4_3
public static final String RATIO_4_3
Aspect ratio 4:3 (landscape), i.e. width/height = 4/3.- See Also:
- Constant Field Values
-
RATIO_43_18
public static final String RATIO_43_18
Aspect ratio 43:18 (landscape), i.e. width/height = 43/18.- See Also:
- Constant Field Values
-
RATIO_18_43
public static final String RATIO_18_43
Aspect ratio 18:43 (portrait), i.e. width/height = 18/43.- See Also:
- Constant Field Values
-
RATIO_21_9
public static final String RATIO_21_9
Aspect ratio 21:9 (landscape), i.e. width/height = 21/9.- See Also:
- Constant Field Values
-
RATIO_9_21
public static final String RATIO_9_21
Aspect ratio 9:21 (portrait), i.e. width/height = 9/21.- See Also:
- Constant Field Values
-
RATIO_64_27
public static final String 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:
- Constant Field Values
-
RATIO_9_16
public static final String RATIO_9_16
Aspect ratio 9:16 (portrait), i.e. width/height = 9/16.- See Also:
- Constant Field Values
-
-
Method Detail
-
localizedDescription
public static String localizedDescription(Locale locale, String commonAspectRatio)
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
public static String localizedLabel(Locale locale, String commonAspectRatio)
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.
-
-