ScaleType
enum ScaleType : Enum
Options for scaling the input frames vis-à-vis its container viewfinder.
Summary
Enum Values |
|
|---|---|
FILL_CENTER |
Scale the input frames, maintaining the source aspect ratio, so it fills the entire viewfinder, and center it in the viewfinder. |
FILL_END |
Scale the input frames, maintaining the source aspect ratio, so it fills the entire viewfinder, and align it to the end of the viewfinder, which is the bottom right corner in a left-to-right (LTR) layout, or the bottom left corner in a right-to-left (RTL) layout. |
FILL_START |
Scale the input frames, maintaining the source aspect ratio, so it fills the entire viewfinder, and align it to the start of the viewfinder, which is the top left corner in a left-to-right (LTR) layout, or the top right corner in a right-to-left (RTL) layout. |
FIT_CENTER |
Scale the input frames, maintaining the source aspect ratio, so it is entirely contained within the viewfinder, and center it inside the viewfinder. |
FIT_END |
Scale the input frames, maintaining the source aspect ratio, so it is entirely contained within the viewfinder, and align it to the end of the viewfinder, which is the bottom right corner in a left-to-right (LTR) layout, or the bottom left corner in a right-to-left (RTL) layout. |
FIT_START |
Scale the input frames, maintaining the source aspect ratio, so it is entirely contained within the viewfinder, and align it to the start of the viewfinder, which is the top left corner in a left-to-right (LTR) layout, or the top right corner in a right-to-left (RTL) layout. |
Public functions |
|
|---|---|
ScaleType |
Returns the enum constant of this type with the specified name. |
Array<ScaleType> |
values()Returns an array containing the constants of this enum type, in the order they're declared. |
Public properties |
|
|---|---|
EnumEntries<ScaleType> |
Returns a representation of an immutable list of all enum entries, in the order they're declared. |
Enum Values
FILL_CENTER
val ScaleType.FILL_CENTER: ScaleType
Scale the input frames, maintaining the source aspect ratio, so it fills the entire viewfinder, and center it in the viewfinder.
This may cause the input frames to be cropped if the input frame aspect ratio does not match that of its container viewfinder.
FILL_END
val ScaleType.FILL_END: ScaleType
Scale the input frames, maintaining the source aspect ratio, so it fills the entire viewfinder, and align it to the end of the viewfinder, which is the bottom right corner in a left-to-right (LTR) layout, or the bottom left corner in a right-to-left (RTL) layout.
This may cause the input frames to be cropped if the input frame aspect ratio does not match that of its container viewfinder.
FILL_START
val ScaleType.FILL_START: ScaleType
Scale the input frames, maintaining the source aspect ratio, so it fills the entire viewfinder, and align it to the start of the viewfinder, which is the top left corner in a left-to-right (LTR) layout, or the top right corner in a right-to-left (RTL) layout.
This may cause the input frames to be cropped if the input frame aspect ratio does not match that of its container viewfinder.
FIT_CENTER
val ScaleType.FIT_CENTER: ScaleType
Scale the input frames, maintaining the source aspect ratio, so it is entirely contained within the viewfinder, and center it inside the viewfinder. The background area not covered by the input frames will be black or the background color of the viewfinder.
Both dimensions of the input frames will be equal or less than the corresponding dimensions of its container viewfinder.
FIT_END
val ScaleType.FIT_END: ScaleType
Scale the input frames, maintaining the source aspect ratio, so it is entirely contained within the viewfinder, and align it to the end of the viewfinder, which is the bottom right corner in a left-to-right (LTR) layout, or the bottom left corner in a right-to-left (RTL) layout. The background area not covered by the input frames will be black or the background color of the viewfinder.
Both dimensions of the input frames will be equal or less than the corresponding dimensions of its container viewfinder.
FIT_START
val ScaleType.FIT_START: ScaleType
Scale the input frames, maintaining the source aspect ratio, so it is entirely contained within the viewfinder, and align it to the start of the viewfinder, which is the top left corner in a left-to-right (LTR) layout, or the top right corner in a right-to-left (RTL) layout. The background area not covered by the input frames will be black or the background color of the viewfinder.
Both dimensions of the input frames will be equal or less than the corresponding dimensions of its container viewfinder.
Public functions
valueOf
fun valueOf(value: String): ScaleType
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.)
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
if this enum type has no constant with the specified name |
Public properties
entries
val entries: EnumEntries<ScaleType>
Returns a representation of an immutable list of all enum entries, in the order they're declared.
This method may be used to iterate over the enum entries.