# MutableAffineTransform

Artifact: [androidx.ink:ink-geometry](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/geometry/MutableAffineTransform.kt+class:androidx.ink.geometry.MutableAffineTransform) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOS
- Cmn

  ```
  class MutableAffineTransform : AffineTransform
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.ink.geometry.AffineTransform](https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform) ||
|   | ↳ | [androidx.ink.geometry.MutableAffineTransform](https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform) |

*** ** * ** ***

A mutable affine transformation in the plane. Individual operations can be populated with methods like `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromTranslation(kotlin.Float,kotlin.Float)` and `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromRotationDegrees(kotlin.Float)`.

See `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` for more general documentation about how these transforms are represented. See `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableAffineTransform` for an immutable alternative to this class.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#MutableAffineTransform()()` Constructs an identity `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform`: | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#MutableAffineTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)( m00: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, m10: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, m20: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, m01: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, m11: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, m21: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Constructs this transform with 6 float values, starting with the top left corner of the matrix and proceeding in row-major order. | Cmn |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` Component-wise equality operator for `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#hashCode()()` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFrom(androidx.ink.geometry.AffineTransform)(input: https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform)` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with the same values contained in `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFrom(androidx.ink.geometry.AffineTransform)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromIdentity()()` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with an identity transformation, which maps a point to itself, i.e. it leaves it unchanged. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromRotationDegrees(kotlin.Float)(degrees: @https://developer.android.com/reference/kotlin/androidx/ink/geometry/AngleDegreesFloat https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that rotates `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromRotationDegrees(kotlin.Float)` in the direction from the positive x-axis towards the positive y-axis. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromScale(kotlin.Float)(scaleFactor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that scales in both the x and y direction by the given `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromScale(kotlin.Float)`, centered about the origin. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromScale(kotlin.Float,kotlin.Float)(xScaleFactor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, yScaleFactor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that scales in both the x- and y-direction by the given pair of factors; `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromScale(kotlin.Float,kotlin.Float)` and `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromScale(kotlin.Float,kotlin.Float)` respectively, centered about the origin. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromScaleX(kotlin.Float)(scaleFactor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that scales in the x-direction by the given factor, centered about the origin. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromScaleY(kotlin.Float)(scaleFactor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that scales in the y-direction by the given factor, centered about the origin. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromSkewX(kotlin.Float)(sx: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that skews in the x-direction by the given factor. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromSkewY(kotlin.Float)(sy: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that skews in the y-direction by the given factor. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromTranslation(androidx.ink.geometry.Vec)(offset: https://developer.android.com/reference/kotlin/androidx/ink/geometry/Vec)` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that translates by the given `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromTranslation(androidx.ink.geometry.Vec)` vector. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromTranslation(kotlin.Float,kotlin.Float)(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that translates by the given `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromTranslation(kotlin.Float,kotlin.Float)` and `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromTranslation(kotlin.Float,kotlin.Float)` offset components. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#setValues(kotlin.FloatArray)(values: @https://developer.android.com/reference/kotlin/androidx/annotation/Size(min = 6) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html)` Like `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#setValues(kotlin.FloatArray)`, but accepts a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html` instead of individual float values. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#setValues(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)(m00: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, m10: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, m20: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, m01: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, m11: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, m21: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Populates this transform with the given values, starting with the top left corner of the matrix and proceeding in row-major order. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#toImmutable()()` Returns an immutable equivalent of this object. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#m00()` Value in the first row, first column of the transform matrix. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#m01()` Value in the second row, first column of the transform matrix. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#m10()` Value in the first row, second column of the transform matrix. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#m11()` Value in the second row, second column of the transform matrix. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#m20()` Value in the first row, third column of the transform matrix. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#m21()` Value in the second row, third column of the transform matrix. | Cmn |

| ### Extension functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform.https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#(androidx.ink.geometry.MutableAffineTransform).populateFrom(kotlinx.cinterop.CValue)( transform: https://kotlinlang.org/api/core/kotlin-stdlib/kotlinx.cinterop/-c-value/index.html<platform.CoreGraphics.CGAffineTransform> )` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(kotlinx.cinterop.CValue)`. | N |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform.https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#(androidx.ink.geometry.MutableAffineTransform).populateFrom(android.graphics.Matrix)(matrix: https://developer.android.com/reference/android/graphics/Matrix.html)` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(android.graphics.Matrix)`. | android |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform.https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#(androidx.ink.geometry.MutableAffineTransform).populateFrom(androidx.compose.ui.graphics.Matrix)(matrix: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix)` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/compose/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(androidx.compose.ui.graphics.Matrix)`. | android |

### Inherited functions

From [androidx.ink.geometry.AffineTransform](https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform) `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableParallelogram` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Box)(box: https://developer.android.com/reference/kotlin/androidx/ink/geometry/Box)`

Returns an `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableParallelogram` containing the result of applying the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` to `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Box)`.
Cmn `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableParallelogram` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Parallelogram)(parallelogram: https://developer.android.com/reference/kotlin/androidx/ink/geometry/Parallelogram)`

Returns an `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableParallelogram` containing the result of applying the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` to `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Parallelogram)`.
Cmn `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableVec` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Vec)(point: https://developer.android.com/reference/kotlin/androidx/ink/geometry/Vec)`

Returns an `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableVec` containing the result of applying the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` to `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Vec)`.
Cmn `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableSegment` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Segment)(segment: https://developer.android.com/reference/kotlin/androidx/ink/geometry/Segment)`

Returns an `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableSegment` containing the result of applying the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` to `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Segment)`.
Cmn `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableTriangle` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Triangle)(triangle: https://developer.android.com/reference/kotlin/androidx/ink/geometry/Triangle)`

Returns an `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableTriangle` containing the result of applying the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` to `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Triangle)`.
Cmn `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableParallelogram` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Box,androidx.ink.geometry.MutableParallelogram)(box: https://developer.android.com/reference/kotlin/androidx/ink/geometry/Box, outParallelogram: https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableParallelogram)`

Apply the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` to the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Box` and store the result in the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableParallelogram`.
Cmn `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableParallelogram` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Parallelogram,androidx.ink.geometry.MutableParallelogram)(
parallelogram: https://developer.android.com/reference/kotlin/androidx/ink/geometry/Parallelogram,
outParallelogram: https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableParallelogram
)`

Apply the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` to the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Parallelogram` and store the result in the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableParallelogram`.
Cmn `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableVec` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Vec,androidx.ink.geometry.MutableVec)(point: https://developer.android.com/reference/kotlin/androidx/ink/geometry/Vec, outVec: https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableVec)`

Apply the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` to the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Vec` and store the result in the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableVec`.
Cmn `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableSegment` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Segment,androidx.ink.geometry.MutableSegment)(segment: https://developer.android.com/reference/kotlin/androidx/ink/geometry/Segment, outSegment: https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableSegment)`

Apply the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` to the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Segment` and store the result in the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableSegment`.
Cmn `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableTriangle` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#applyTransform(androidx.ink.geometry.Triangle,androidx.ink.geometry.MutableTriangle)(triangle: https://developer.android.com/reference/kotlin/androidx/ink/geometry/Triangle, outTriangle: https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableTriangle)`

Apply the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` to the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Triangle` and store the result in the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableTriangle`.
Cmn `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableAffineTransform` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#computeInverse()()`

Returns the inverse of the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform`.
Cmn `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#computeInverse(androidx.ink.geometry.MutableAffineTransform)(outAffineTransform: https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform)`

Populates `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#computeInverse(androidx.ink.geometry.MutableAffineTransform)` with the inverse of this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform`.
Cmn `@https://developer.android.com/reference/kotlin/androidx/annotation/Size(min = 6) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#getValues(kotlin.FloatArray)(outArray: @https://developer.android.com/reference/kotlin/androidx/annotation/Size(min = 6) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html)`

Populates the first 6 elements of `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#getValues(kotlin.FloatArray)` with the values of this transform, starting with the top left corner of the matrix and proceeding in row-major order.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#isAlmostEqual(androidx.ink.geometry.AffineTransform,kotlin.Float)(
other: https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform,
tolerance: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html
)`

Compares this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` with `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#isAlmostEqual(androidx.ink.geometry.AffineTransform,kotlin.Float)`, and returns true if each component of the transform matrix is within `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#isAlmostEqual(androidx.ink.geometry.AffineTransform,kotlin.Float)` of the corresponding component of `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#isAlmostEqual(androidx.ink.geometry.AffineTransform,kotlin.Float)`.
Cmn

## Public constructors

### MutableAffineTransform

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
MutableAffineTransform()
```

Constructs an identity `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform`:

```kotlin
⎡1  0  0⎤
⎢0  1  0⎥
⎣0  0  1⎦
```

This is useful when pre-allocating a scratch instance to be filled later.

### MutableAffineTransform

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
MutableAffineTransform(
    m00: Float,
    m10: Float,
    m20: Float,
    m01: Float,
    m11: Float,
    m21: Float
)
```

Constructs this transform with 6 float values, starting with the top left corner of the matrix and proceeding in row-major order. Prefer to create this object with functions that apply specific transform operations, such as `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromScale(kotlin.Float)` or `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromRotationDegrees(kotlin.Float)`, rather than directly passing in the actual numeric values of this transform. This constructor is useful for when the values are needed to be provided all at once, for example for serialization. To access these values in the same order as they are passed in here, use `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#getValues(kotlin.FloatArray)`. To construct this object using an array as input, there is another public constructor for that.

## Public functions

### equals

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

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

Component-wise equality operator for `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform`.

Due to the propagation floating point precision errors, operations that may be equivalent over the real numbers are not always equivalent for floats, and might return false for `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#equals(kotlin.Any)` in some cases.

### hashCode

Cmn

```
open fun hashCode(): Int
```

### populateFrom

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
fun populateFrom(input: AffineTransform): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with the same values contained in `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFrom(androidx.ink.geometry.AffineTransform)`.

Returns the modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

### populateFromIdentity

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
fun populateFromIdentity(): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with an identity transformation, which maps a point to itself, i.e. it leaves it unchanged.

Returns the modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

### populateFromRotationDegrees

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
fun populateFromRotationDegrees(degrees: @AngleDegreesFloat Float): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that rotates `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromRotationDegrees(kotlin.Float)` in the direction from the positive x-axis towards the positive y-axis.

Returns the modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

### populateFromScale

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
fun populateFromScale(scaleFactor: Float): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that scales in both the x and y direction by the given `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromScale(kotlin.Float)`, centered about the origin.

Returns the modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

### populateFromScale

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
fun populateFromScale(xScaleFactor: Float, yScaleFactor: Float): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that scales in both the x- and y-direction by the given pair of factors; `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromScale(kotlin.Float,kotlin.Float)` and `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromScale(kotlin.Float,kotlin.Float)` respectively, centered about the origin.

Returns the modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

### populateFromScaleX

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
fun populateFromScaleX(scaleFactor: Float): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that scales in the x-direction by the given factor, centered about the origin.

Returns the modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

### populateFromScaleY

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
fun populateFromScaleY(scaleFactor: Float): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that scales in the y-direction by the given factor, centered about the origin.

Returns the modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

### populateFromSkewX

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
fun populateFromSkewX(sx: Float): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that skews in the x-direction by the given factor.

Returns the modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

### populateFromSkewY

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
fun populateFromSkewY(sy: Float): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that skews in the y-direction by the given factor.

Returns the modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

### populateFromTranslation

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
fun populateFromTranslation(offset: Vec): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that translates by the given `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromTranslation(androidx.ink.geometry.Vec)` vector.

Returns the modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

### populateFromTranslation

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
fun populateFromTranslation(x: Float, y: Float): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with a transformation that translates by the given `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromTranslation(kotlin.Float,kotlin.Float)` and `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromTranslation(kotlin.Float,kotlin.Float)` offset components.

Returns the modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

### setValues

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
fun setValues(values: @Size(min = 6) FloatArray): Unit
```

Like `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#setValues(kotlin.FloatArray)`, but accepts a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html` instead of individual float values.

### setValues

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
fun setValues(m00: Float, m10: Float, m20: Float, m01: Float, m11: Float, m21: Float): Unit
```

Populates this transform with the given values, starting with the top left corner of the matrix and proceeding in row-major order.

Prefer to modify this object with functions that apply specific transform operations, such as `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromScale(kotlin.Float)` or `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform#populateFromRotationDegrees(kotlin.Float)`, rather than directly setting the actual numeric values of this transform. This function is useful for when the values are needed to be provided in bulk, for example for serialization.

To access these values in the same order as they are set here, use `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform#getValues(kotlin.FloatArray)`.

### toImmutable

Cmn

```
open fun toImmutable(): ImmutableAffineTransform
```

Returns an immutable equivalent of this object. This will return itself if called on an immutable instance.

### toString

Cmn

```
open fun toString(): String
```

## Public properties

### m00

Cmn

```
open var m00: Float
```

Value in the first row, first column of the transform matrix.

### m01

Cmn

```
open var m01: Float
```

Value in the second row, first column of the transform matrix.

### m10

Cmn

```
open var m10: Float
```

Value in the first row, second column of the transform matrix.

### m11

Cmn

```
open var m11: Float
```

Value in the second row, second column of the transform matrix.

### m20

Cmn

```
open var m20: Float
```

Value in the first row, third column of the transform matrix.

### m21

Cmn

```
open var m21: Float
```

Value in the second row, third column of the transform matrix.

## Extension functions

### MutableAffineTransform.populateFrom

N Artifact: [androidx.ink:ink-geometry](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/geometry/AffineTransformExtensions.ios.kt+function:populateFrom)

```
fun MutableAffineTransform.populateFrom(
    transform: CValue<platform.CoreGraphics.CGAffineTransform>
): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(kotlinx.cinterop.CValue)`.

Leaves `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(kotlinx.cinterop.CValue)` unchanged. Returns this modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

### MutableAffineTransform.populateFrom

android Artifact: [androidx.ink:ink-geometry](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/geometry/AndroidGraphicsConversionExtensions.android.kt+function:populateFrom)

```
fun MutableAffineTransform.populateFrom(matrix: Matrix): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(android.graphics.Matrix)`.

If `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(android.graphics.Matrix)` is not an affine transform, throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` instead.

Leaves `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(android.graphics.Matrix)` unchanged. Returns this modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(android.graphics.Matrix)` is not an affine transform. |

### MutableAffineTransform.populateFrom

android Artifact: [androidx.ink:ink-geometry-compose](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/geometry/compose/ComposeConversionExtensions.kt+function:populateFrom)

```
fun MutableAffineTransform.populateFrom(matrix: Matrix): MutableAffineTransform
```

Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/compose/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(androidx.compose.ui.graphics.Matrix)`.

If `https://developer.android.com/reference/kotlin/androidx/ink/geometry/compose/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(androidx.compose.ui.graphics.Matrix)` is not an affine transform, throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` instead.

Leaves the input `https://developer.android.com/reference/kotlin/androidx/ink/geometry/compose/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(androidx.compose.ui.graphics.Matrix)` unchanged. Returns the modified instance to allow chaining calls.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | `this` |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/ink/geometry/compose/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(androidx.compose.ui.graphics.Matrix)` is not a 2D affine transform. |