# Matrix

Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/Matrix.kt+class:androidx.compose.ui.graphics.Matrix) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  value class Matrix
  ```

*** ** * ** ***

## Summary

| ### Constants |
|---|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#Perspective0() = 3` Index of the flattened array that represents the perspective factor along the X axis | Cmn |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#Perspective1() = 7` Index of the flattened array that represents the perspective factor along the Y axis | Cmn |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#Perspective2() = 15` Index of the flattened array that represents the perspective factor along the Z axis | Cmn |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#ScaleX() = 0` Index of the flattened array that represents the scale factor along the X axis | Cmn |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#ScaleY() = 5` Index of the flattened array that represents the scale factor along the Y axis | Cmn |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#ScaleZ() = 10` Index of the flattened array that represents the scale factor along the Z axis | Cmn |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#SkewX() = 4` Index of the flattened array that represents the skew factor along the X axis | Cmn |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#SkewY() = 1` Index of the flattened array that represents the skew factor along the Y axis | Cmn |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#TranslateX() = 12` Index of the flattened array that represents the translation along the X axis | Cmn |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#TranslateY() = 13` Index of the flattened array that represents the translation along the Y axis | Cmn |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#TranslateZ() = 14` Index of the flattened array that represents the translation along the Z axis | Cmn |

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#Matrix(kotlin.FloatArray)(values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html)` | Cmn |

| ### Public functions |
|---|---|---|
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#get(kotlin.Int,kotlin.Int)(row: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, column: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#invert()()` Invert `this` Matrix. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#map(androidx.compose.ui.geometry.Offset)(point: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Does the 3D transform on `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#map(androidx.compose.ui.geometry.Offset)` and returns the `x` and `y` values in an `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#map(androidx.compose.ui.geometry.MutableRect)(rect: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/MutableRect)` Does a 3D transform on `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#map(androidx.compose.ui.geometry.MutableRect)`, transforming `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#map(androidx.compose.ui.geometry.MutableRect)` with the results. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#map(androidx.compose.ui.geometry.Rect)(rect: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect)` Does a 3D transform on `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#map(androidx.compose.ui.geometry.Rect)` and returns its bounds after the transform. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#reset()()` Resets the `this` to the identity matrix. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#resetToPivotedTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)( pivotX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, pivotY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, translationX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, translationY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, translationZ: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, rotationX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, rotationY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, rotationZ: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, scaleX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, scaleY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, scaleZ: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Resets this matrix to a "TRS" (translation, rotation, scale) transform around a pivot point. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#rotateX(kotlin.Float)(degrees: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Applies a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#rotateX(kotlin.Float)` rotation around X to `this`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#rotateY(kotlin.Float)(degrees: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Applies a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#rotateY(kotlin.Float)` rotation around Y to `this`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#rotateZ(kotlin.Float)(degrees: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Applies a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#rotateZ(kotlin.Float)` rotation around Z to `this`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#scale(kotlin.Float,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, z: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Scale this matrix by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#scale(kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#scale(kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#scale(kotlin.Float,kotlin.Float,kotlin.Float)` | Cmn |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#set(kotlin.Int,kotlin.Int,kotlin.Float)(row: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, column: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, v: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#setFrom(androidx.compose.ui.graphics.Matrix)(matrix: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix)` Sets the entire matrix to the matrix in `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#setFrom(androidx.compose.ui.graphics.Matrix)`. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#timesAssign(androidx.compose.ui.graphics.Matrix)(m: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix)` Multiply this matrix by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#timesAssign(androidx.compose.ui.graphics.Matrix)` and assign the result to this matrix. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#toString()()` | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#translate(kotlin.Float,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, z: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Translate this matrix by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#translate(kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#translate(kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#translate(kotlin.Float,kotlin.Float,kotlin.Float)` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#values()` | Cmn |

| ### Extension functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#(androidx.compose.ui.graphics.Matrix).setFrom(android.graphics.Matrix)(matrix: https://developer.android.com/reference/android/graphics/Matrix.html)` Set the matrix values the native `https://developer.android.com/reference/android/graphics/Matrix.html`. | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#(androidx.compose.ui.graphics.Matrix).isIdentity()()` Whether the given matrix is the identity matrix. | Cmn |

## Constants

### Perspective0

Cmn

```
const val Perspective0 = 3: Int
```

Index of the flattened array that represents the perspective factor along the X axis

### Perspective1

Cmn

```
const val Perspective1 = 7: Int
```

Index of the flattened array that represents the perspective factor along the Y axis

### Perspective2

Cmn

```
const val Perspective2 = 15: Int
```

Index of the flattened array that represents the perspective factor along the Z axis

### ScaleX

Cmn

```
const val ScaleX = 0: Int
```

Index of the flattened array that represents the scale factor along the X axis

### ScaleY

Cmn

```
const val ScaleY = 5: Int
```

Index of the flattened array that represents the scale factor along the Y axis

### ScaleZ

Cmn

```
const val ScaleZ = 10: Int
```

Index of the flattened array that represents the scale factor along the Z axis

### SkewX

Cmn

```
const val SkewX = 4: Int
```

Index of the flattened array that represents the skew factor along the X axis

### SkewY

Cmn

```
const val SkewY = 1: Int
```

Index of the flattened array that represents the skew factor along the Y axis

### TranslateX

Cmn

```
const val TranslateX = 12: Int
```

Index of the flattened array that represents the translation along the X axis

### TranslateY

Cmn

```
const val TranslateY = 13: Int
```

Index of the flattened array that represents the translation along the Y axis

### TranslateZ

Cmn

```
const val TranslateZ = 14: Int
```

Index of the flattened array that represents the translation along the Z axis

## Public constructors

### Matrix

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
Matrix(
    values: FloatArray = floatArrayOf(1f, 0f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 0f, 1f)
)
```

## Public functions

### get

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

```
inline operator fun get(row: Int, column: Int): Float
```

### invert

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
fun invert(): Unit
```

Invert `this` Matrix.

### map

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun map(point: Offset): Offset
```

Does the 3D transform on `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#map(androidx.compose.ui.geometry.Offset)` and returns the `x` and `y` values in an `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset`.

### map

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
fun map(rect: MutableRect): Unit
```

Does a 3D transform on `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#map(androidx.compose.ui.geometry.MutableRect)`, transforming `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#map(androidx.compose.ui.geometry.MutableRect)` with the results.

### map

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
fun map(rect: Rect): Rect
```

Does a 3D transform on `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#map(androidx.compose.ui.geometry.Rect)` and returns its bounds after the transform.

### reset

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
fun reset(): Unit
```

Resets the `this` to the identity matrix.

### resetToPivotedTransform

Cmn Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.8.0)

```
fun resetToPivotedTransform(
    pivotX: Float = 0.0f,
    pivotY: Float = 0.0f,
    translationX: Float = 0.0f,
    translationY: Float = 0.0f,
    translationZ: Float = 0.0f,
    rotationX: Float = 0.0f,
    rotationY: Float = 0.0f,
    rotationZ: Float = 0.0f,
    scaleX: Float = 1.0f,
    scaleY: Float = 1.0f,
    scaleZ: Float = 1.0f
): Unit
```

Resets this matrix to a "TRS" (translation, rotation, scale) transform around a pivot point. The transform operations encoded in the matrix are the following, in this specific order:

- A translation by -`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#resetToPivotedTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, -`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#resetToPivotedTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`

- A translation by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#resetToPivotedTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#resetToPivotedTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#resetToPivotedTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`

- An X rotation by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#resetToPivotedTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`

- A Y rotation by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#resetToPivotedTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`

- A Z rotation by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#resetToPivotedTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`

- A scale by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#resetToPivotedTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#resetToPivotedTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`

- A translation by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#resetToPivotedTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#resetToPivotedTransform(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`

Calling this method is equivalent to the following code:

```kotlin
val m: Matrix ...
m.reset()
m.translate(-pivotX, -pivotY)
m *= Matrix().apply {
    translate(translationX, translationY)
    rotateX(rotationX)
    rotateY(rotationY)
    rotateZ(rotationZ)
    scale(scaleX, scaleY)
}
m *= Matrix().apply { translate(pivotX, pivotY) }
```

### rotateX

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
fun rotateX(degrees: Float): Unit
```

Applies a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#rotateX(kotlin.Float)` rotation around X to `this`.

### rotateY

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
fun rotateY(degrees: Float): Unit
```

Applies a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#rotateY(kotlin.Float)` rotation around Y to `this`.

### rotateZ

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
fun rotateZ(degrees: Float): Unit
```

Applies a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#rotateZ(kotlin.Float)` rotation around Z to `this`.

### scale

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
fun scale(x: Float = 1.0f, y: Float = 1.0f, z: Float = 1.0f): Unit
```

Scale this matrix by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#scale(kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#scale(kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#scale(kotlin.Float,kotlin.Float,kotlin.Float)`

### set

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

```
inline operator fun set(row: Int, column: Int, v: Float): Unit
```

### setFrom

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun setFrom(matrix: Matrix): Unit
```

Sets the entire matrix to the matrix in `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#setFrom(androidx.compose.ui.graphics.Matrix)`.

### timesAssign

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
operator fun timesAssign(m: Matrix): Unit
```

Multiply this matrix by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#timesAssign(androidx.compose.ui.graphics.Matrix)` and assign the result to this matrix.

### toString

Cmn

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

### translate

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
fun translate(x: Float = 0.0f, y: Float = 0.0f, z: Float = 0.0f): Unit
```

Translate this matrix by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#translate(kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#translate(kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix#translate(kotlin.Float,kotlin.Float,kotlin.Float)`

## Public properties

### values

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

```
val values: FloatArray
```

## Extension functions

### Matrix.setFrom

android Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/AndroidMatrixConversions.android.kt+function:setFrom)

```
fun Matrix.setFrom(matrix: Matrix): Unit
```

Set the matrix values the native `https://developer.android.com/reference/android/graphics/Matrix.html`.

### Matrix.isIdentity

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/Matrix.kt+function:isIdentity)

```
fun Matrix.isIdentity(): Boolean
```

Whether the given matrix is the identity matrix.