# AndroidGraphicsConverter

Added in 1.0.0

*** ** * ** ***


```
public final class AndroidGraphicsConverter
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/BoxAccumulator` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.BoxAccumulator).add(android.graphics.RectF)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/BoxAccumulator receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/RectF.html rect)` Expands the accumulated bounding box (if necessary) such that it also contains `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.BoxAccumulator).add(android.graphics.RectF)`. |
| `static final https://developer.android.com/reference/androidx/ink/geometry/ImmutableAffineTransform` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#createAffineTransform(android.graphics.Matrix)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Matrix.html matrix)` Constructs an `https://developer.android.com/reference/androidx/ink/geometry/ImmutableAffineTransform` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#createAffineTransform(android.graphics.Matrix)`. |
| `static final https://developer.android.com/reference/androidx/ink/geometry/ImmutableBox` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#createBox(android.graphics.RectF)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/RectF.html rect)` Constructs an `https://developer.android.com/reference/androidx/ink/geometry/ImmutableBox` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#createBox(android.graphics.RectF)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/ImmutableVec` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#createVec(android.graphics.PointF)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html point)` Constructs an `https://developer.android.com/reference/androidx/ink/geometry/ImmutableVec` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#createVec(android.graphics.PointF)`. |
| `static final https://developer.android.com/reference/androidx/ink/geometry/ImmutableAffineTransform` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.ImmutableAffineTransform.Companion).from(android.graphics.Matrix)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/ImmutableAffineTransform.Companion receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Matrix.html matrix )` Constructs an `https://developer.android.com/reference/androidx/ink/geometry/ImmutableAffineTransform` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableAffineTransform.Companion).from(android.graphics.Matrix)`. |
| `static final https://developer.android.com/reference/androidx/ink/geometry/ImmutableBox` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.ImmutableBox.Companion).from(android.graphics.RectF)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/ImmutableBox.Companion receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/RectF.html rect)` Constructs an `https://developer.android.com/reference/androidx/ink/geometry/ImmutableBox` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableBox.Companion).from(android.graphics.RectF)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/ImmutableVec` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.ImmutableVec.Companion).from(android.graphics.PointF)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/ImmutableVec.Companion receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html point)` Constructs an `https://developer.android.com/reference/androidx/ink/geometry/ImmutableVec` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableVec.Companion).from(android.graphics.PointF)`. |
| `static final boolean` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.BoxAccumulator).getBounds(android.graphics.RectF)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/BoxAccumulator receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/RectF.html outRect)` Fill the given `https://developer.android.com/reference/android/graphics/RectF.html` with the bounds of this `https://developer.android.com/reference/androidx/ink/geometry/BoxAccumulator`, returning whether or not the object was actually overwritten. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Path.html` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.PartitionedMesh).outlinesToPath(kotlin.Int)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/PartitionedMesh receiver, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int renderGroupIndex )` Returns a `https://developer.android.com/reference/android/graphics/Path.html` containing the outlines in the render group at `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.PartitionedMesh).outlinesToPath(kotlin.Int)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/MutableAffineTransform` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.MutableAffineTransform).populateFrom(android.graphics.Matrix)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/MutableAffineTransform receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Matrix.html matrix )` Fills this `https://developer.android.com/reference/androidx/ink/geometry/MutableAffineTransform` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(android.graphics.Matrix)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/MutableVec` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.MutableVec).populateFrom(android.graphics.PointF)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/MutableVec receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html point)` Fills this `https://developer.android.com/reference/androidx/ink/geometry/MutableVec` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableVec).populateFrom(android.graphics.PointF)`. |
| `static final void` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.AffineTransform).populateMatrix(android.graphics.Matrix)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/AffineTransform receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Matrix.html out)` Writes the values from this `https://developer.android.com/reference/androidx/ink/geometry/AffineTransform` to `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.AffineTransform).populateMatrix(android.graphics.Matrix)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Path.html` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.PartitionedMesh).populateOutlines(kotlin.Int,android.graphics.Path)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/PartitionedMesh receiver, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int renderGroupIndex, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Path.html out )` Replaces the contents of `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.PartitionedMesh).populateOutlines(kotlin.Int,android.graphics.Path)` with the outline of the render group at `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.PartitionedMesh).populateOutlines(kotlin.Int,android.graphics.Path)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.Vec).populatePointF(android.graphics.PointF)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/Vec receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html out)` Writes the values from this `https://developer.android.com/reference/androidx/ink/geometry/Vec` to `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Vec).populatePointF(android.graphics.PointF)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/RectF.html` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.Box).populateRectF(android.graphics.RectF)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/Box receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/RectF.html out)` Writes the values from this `https://developer.android.com/reference/androidx/ink/geometry/Box` to `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Box).populateRectF(android.graphics.RectF)`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Matrix.html` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.AffineTransform).toMatrix()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/AffineTransform receiver)` Constructs a `https://developer.android.com/reference/android/graphics/Matrix.html` with the values from the `https://developer.android.com/reference/androidx/ink/geometry/AffineTransform`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.Vec).toPointF()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/Vec receiver)` Constructs a `https://developer.android.com/reference/android/graphics/PointF.html` with the same coordinates as the `https://developer.android.com/reference/androidx/ink/geometry/Vec` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/RectF.html` | `https://developer.android.com/reference/androidx/ink/geometry/AndroidGraphicsConverter#(androidx.ink.geometry.Box).toRectF()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/Box receiver)` Constructs a `https://developer.android.com/reference/android/graphics/RectF.html` with the same coordinates as the `https://developer.android.com/reference/androidx/ink/geometry/Box` |

## Public methods

### add

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:add) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final @NonNull BoxAccumulator add(@NonNull BoxAccumulator receiver, @NonNull RectF rect)
```

Expands the accumulated bounding box (if necessary) such that it also contains `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.BoxAccumulator).add(android.graphics.RectF)`. If `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.BoxAccumulator).add(android.graphics.RectF)` is null, this is a no-op.

This is functionally equivalent to, but more efficient than: `add(ImmutableBox.from(rect))`

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/BoxAccumulator` | `this` |

### createAffineTransform

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:createAffineTransform) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final ImmutableAffineTransform createAffineTransform(@NonNull Matrix matrix)
```

Constructs an `https://developer.android.com/reference/androidx/ink/geometry/ImmutableAffineTransform` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#createAffineTransform(android.graphics.Matrix)`.

If `https://developer.android.com/reference/androidx/ink/geometry/package-summary#createAffineTransform(android.graphics.Matrix)` is not an affine transform, returns null instead.

Performance-sensitive code should use the `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(android.graphics.Matrix)` overload that takes a pre-allocated `https://developer.android.com/reference/androidx/ink/geometry/MutableAffineTransform`, so that the instance can be reused across multiple calls.

Kotlin callers should prefer `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableAffineTransform.Companion).from(android.graphics.Matrix)`.

### createBox

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:createBox) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final ImmutableBox createBox(@NonNull RectF rect)
```

Constructs an `https://developer.android.com/reference/androidx/ink/geometry/ImmutableBox` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#createBox(android.graphics.RectF)`.

If `https://developer.android.com/reference/androidx/ink/geometry/package-summary#createBox(android.graphics.RectF)` is empty, returns null instead.

Kotlin callers should prefer `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableBox.Companion).from(android.graphics.RectF)`.

### createVec

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:createVec) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final @NonNull ImmutableVec createVec(@NonNull PointF point)
```

Constructs an `https://developer.android.com/reference/androidx/ink/geometry/ImmutableVec` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#createVec(android.graphics.PointF)`.

Kotlin callers should prefer `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableVec.Companion).from(android.graphics.PointF)`.

### from

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:from) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final ImmutableAffineTransform from(
    @NonNull ImmutableAffineTransform.Companion receiver,
    @NonNull Matrix matrix
)
```

Constructs an `https://developer.android.com/reference/androidx/ink/geometry/ImmutableAffineTransform` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableAffineTransform.Companion).from(android.graphics.Matrix)`.

If `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableAffineTransform.Companion).from(android.graphics.Matrix)` is not an affine transform, returns null instead.

Performance-sensitive code should use the `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(android.graphics.Matrix)` overload that takes a pre-allocated `https://developer.android.com/reference/androidx/ink/geometry/MutableAffineTransform`, so that the instance can be reused across multiple calls.

Java callers should prefer `AndroidGraphicsConverter.createAffineTransform(Matrix)` (`https://developer.android.com/reference/androidx/ink/geometry/package-summary#createAffineTransform(android.graphics.Matrix)`).

### from

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:from) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final ImmutableBox from(@NonNull ImmutableBox.Companion receiver, @NonNull RectF rect)
```

Constructs an `https://developer.android.com/reference/androidx/ink/geometry/ImmutableBox` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableBox.Companion).from(android.graphics.RectF)`.

If `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableBox.Companion).from(android.graphics.RectF)` is empty, returns null instead.

Java callers should prefer `AndroidGraphicsConverter.createBox`(`https://developer.android.com/reference/androidx/ink/geometry/package-summary#createBox(android.graphics.RectF)`).

### from

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:from) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final @NonNull ImmutableVec from(@NonNull ImmutableVec.Companion receiver, @NonNull PointF point)
```

Constructs an `https://developer.android.com/reference/androidx/ink/geometry/ImmutableVec` with the values from `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableVec.Companion).from(android.graphics.PointF)`.

Java callers should prefer `AndroidGraphicsConverter.createVec(PointF)`(`https://developer.android.com/reference/androidx/ink/geometry/package-summary#createVec(android.graphics.PointF)`).

### getBounds

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:getBounds) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final boolean getBounds(@NonNull BoxAccumulator receiver, @NonNull RectF outRect)
```

Fill the given `https://developer.android.com/reference/android/graphics/RectF.html` with the bounds of this `https://developer.android.com/reference/androidx/ink/geometry/BoxAccumulator`, returning whether or not the object was actually overwritten.

### outlinesToPath

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:outlinesToPath) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final @NonNull Path outlinesToPath(
    @NonNull PartitionedMesh receiver,
    @IntRange(from = 0) int renderGroupIndex
)
```

Returns a `https://developer.android.com/reference/android/graphics/Path.html` containing the outlines in the render group at `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.PartitionedMesh).outlinesToPath(kotlin.Int)`.

### populateFrom

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) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final @NonNull MutableAffineTransform populateFrom(
    @NonNull MutableAffineTransform receiver,
    @NonNull Matrix matrix
)
```

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

If `https://developer.android.com/reference/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/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/androidx/annotation/NonNull https://developer.android.com/reference/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/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(android.graphics.Matrix)` is not an affine transform. |

### populateFrom

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) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final @NonNull MutableVec populateFrom(@NonNull MutableVec receiver, @NonNull PointF point)
```

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

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

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/geometry/MutableVec` | `this` |

### populateMatrix

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:populateMatrix) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final void populateMatrix(@NonNull AffineTransform receiver, @NonNull Matrix out)
```

Writes the values from this `https://developer.android.com/reference/androidx/ink/geometry/AffineTransform` to `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.AffineTransform).populateMatrix(android.graphics.Matrix)`.

Returns the modified `https://developer.android.com/reference/android/graphics/Matrix.html` to allow chaining calls.

| Returns |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.AffineTransform).populateMatrix(android.graphics.Matrix)` |

### populateOutlines

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:populateOutlines) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final @NonNull Path populateOutlines(
    @NonNull PartitionedMesh receiver,
    @IntRange(from = 0) int renderGroupIndex,
    @NonNull Path out
)
```

Replaces the contents of `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.PartitionedMesh).populateOutlines(kotlin.Int,android.graphics.Path)` with the outline of the render group at `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.PartitionedMesh).populateOutlines(kotlin.Int,android.graphics.Path)`.

Returns the modified `https://developer.android.com/reference/android/graphics/Path.html` to allow chaining calls.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Path.html` | `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.PartitionedMesh).populateOutlines(kotlin.Int,android.graphics.Path)` |

### populatePointF

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:populatePointF) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final @NonNull PointF populatePointF(@NonNull Vec receiver, @NonNull PointF out)
```

Writes the values from this `https://developer.android.com/reference/androidx/ink/geometry/Vec` to `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Vec).populatePointF(android.graphics.PointF)`.

Returns the modified `https://developer.android.com/reference/android/graphics/PointF.html` instance to allow chaining calls.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Vec).populatePointF(android.graphics.PointF)` |

### populateRectF

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:populateRectF) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final @NonNull RectF populateRectF(@NonNull Box receiver, @NonNull RectF out)
```

Writes the values from this `https://developer.android.com/reference/androidx/ink/geometry/Box` to `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Box).populateRectF(android.graphics.RectF)`.

Returns the modified `https://developer.android.com/reference/android/graphics/RectF.html` instance to allow chaining calls.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/RectF.html` | `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Box).populateRectF(android.graphics.RectF)` |

### toMatrix

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:toMatrix) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final @NonNull Matrix toMatrix(@NonNull AffineTransform receiver)
```

Constructs a `https://developer.android.com/reference/android/graphics/Matrix.html` with the values from the `https://developer.android.com/reference/androidx/ink/geometry/AffineTransform`.

Performance-sensitive code should use the `https://developer.android.com/reference/androidx/ink/geometry/package-summary#(androidx.ink.geometry.AffineTransform).populateMatrix(android.graphics.Matrix)` overload that takes a pre-allocated `https://developer.android.com/reference/android/graphics/Matrix.html`, so that the instance can be reused across multiple calls.

### toPointF

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:toPointF) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final @NonNull PointF toPointF(@NonNull Vec receiver)
```

Constructs a `https://developer.android.com/reference/android/graphics/PointF.html` with the same coordinates as the `https://developer.android.com/reference/androidx/ink/geometry/Vec`

### toRectF

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:toRectF) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/ink#1.0.0)

```
public static final @NonNull RectF toRectF(@NonNull Box receiver)
```

Constructs a `https://developer.android.com/reference/android/graphics/RectF.html` with the same coordinates as the `https://developer.android.com/reference/androidx/ink/geometry/Box`