getTransformationMatrix

open fun getTransformationMatrix(    srcWidth: Int,     srcHeight: Int,     dstWidth: Int,     dstHeight: Int,     applyRotation: Int,     maintainAspectRatio: Boolean): Matrix

Returns a transformation matrix from one reference frame into another. Handles cropping (if maintaining aspect ratio is desired) and rotation.

Return

The transformation fulfilling the desired requirements.

Parameters

srcWidth

Width of source frame.

srcHeight

Height of source frame.

dstWidth

Width of destination frame.

dstHeight

Height of destination frame.

applyRotation

Amount of rotation to apply from one frame to another. Must be a multiple of 90.

maintainAspectRatio

If true, will ensure that scaling in x and y remains constant, cropping the image if necessary.