class TransformationInfo


Transformation information associated with the preview output.

This information can be used to transform the Surface of a Viewfinder to be suitable to be displayed.

Summary

Public constructors

TransformationInfo(
    sourceRotation: Int,
    isSourceMirroredHorizontally: Boolean,
    isSourceMirroredVertically: Boolean,
    cropRectLeft: Int,
    cropRectTop: Int,
    cropRectRight: Int,
    cropRectBottom: Int
)

Public functions

open operator Boolean
equals(other: Any?)
open Int

Public properties

Int

Bottom offset of the cropRect in pixels

Int

Left offset of the cropRect in pixels

Int

Right offset of the cropRect in pixels

Int

Top offset of the cropRect in pixels

Boolean

Indicates whether the source has been mirrored horizontally.

Boolean

Indicates whether the source has been mirrored vertically.

Int

Rotation of the source, relative to the device's natural rotation.

Public constructors

TransformationInfo

Added in 1.4.0-alpha11
TransformationInfo(
    sourceRotation: Int,
    isSourceMirroredHorizontally: Boolean,
    isSourceMirroredVertically: Boolean,
    cropRectLeft: Int,
    cropRectTop: Int,
    cropRectRight: Int,
    cropRectBottom: Int
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

cropRectBottom

Added in 1.4.0-alpha11
val cropRectBottomInt

Bottom offset of the cropRect in pixels

cropRectLeft

Added in 1.4.0-alpha11
val cropRectLeftInt

Left offset of the cropRect in pixels

cropRectRight

Added in 1.4.0-alpha11
val cropRectRightInt

Right offset of the cropRect in pixels

cropRectTop

Added in 1.4.0-alpha11
val cropRectTopInt

Top offset of the cropRect in pixels

isSourceMirroredHorizontally

Added in 1.4.0-alpha11
val isSourceMirroredHorizontallyBoolean

Indicates whether the source has been mirrored horizontally.

This is common if the source comes from a camera that is front-facing.

It is not common for both isSourceMirroredHorizontally and isSourceMirroredVertically to be set to true. This is equivalent to sourceRotation being rotated by an additional 180 degrees.

isSourceMirroredVertically

Added in 1.4.0-alpha11
val isSourceMirroredVerticallyBoolean

Indicates whether the source has been mirrored vertically.

It is not common for a camera source to be mirror vertically, and typically isSourceMirroredHorizontally will be the appropriate property.

It is not common for both isSourceMirroredHorizontally and isSourceMirroredVertically to be set to true. This is equivalent to sourceRotation being rotated by an additional 180 degrees.

See also
MIRROR_MODE_V

sourceRotation

Added in 1.4.0-alpha11
val sourceRotationInt

Rotation of the source, relative to the device's natural rotation.