Added in API level 1

ScaleToFit

class ScaleToFit
kotlin.Any
   ↳ kotlin.Enum<android.graphics.Matrix.ScaleToFit>
   ↳ android.graphics.Matrix.ScaleToFit

Controls how the src rect should align into the dst rect for setRectToRect().

Summary

Enum values

Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst.

Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst.

Scale in X and Y independently, so that src matches dst exactly.

Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst.

Enum values

CENTER

Added in API level 1
enum val CENTER : Matrix.ScaleToFit

Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst. At least one axis (X or Y) will fit exactly. The result is centered inside dst.

END

Added in API level 1
enum val END : Matrix.ScaleToFit

Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst. At least one axis (X or Y) will fit exactly. END aligns the result to the right and bottom edges of dst.

FILL

Added in API level 1
enum val FILL : Matrix.ScaleToFit

Scale in X and Y independently, so that src matches dst exactly. This may change the aspect ratio of the src.

START

Added in API level 1
enum val START : Matrix.ScaleToFit

Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst. At least one axis (X or Y) will fit exactly. START aligns the result to the left and top edges of dst.