# androidx.ink.geometry

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOS

## Classes

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` | An affine transformation in the plane. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Box` | Represents an axis-aligned rectangle. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/BoxAccumulator` | A helper class for accumulating the minimum bounding boxes of zero or more geometry objects. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableAffineTransform` | An immutable affine transformation in the plane. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableBox` | An immutable axis-aligned rectangle. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableParallelogram` | Immutable parallelogram (i.e. a quadrilateral with parallel sides), defined by its `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableParallelogram#center()`, `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableParallelogram#width()`, `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableParallelogram#height()`, `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableParallelogram#rotationDegrees()`, and `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableParallelogram#skew()`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableSegment` | Represents a directed line segment between two points. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableTriangle` | An immutable triangle, defined by its three corners `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableTriangle#(androidx.ink.geometry.Vec,androidx.ink.geometry.Vec,androidx.ink.geometry.Vec)`, `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableTriangle#(androidx.ink.geometry.Vec,androidx.ink.geometry.Vec,androidx.ink.geometry.Vec)` and `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableTriangle#(androidx.ink.geometry.Vec,androidx.ink.geometry.Vec,androidx.ink.geometry.Vec)` in order. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableVec` | An immutable two-dimensional vector, i.e. an (x, y) coordinate pair. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform` | A mutable affine transformation in the plane. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableBox` | A mutable axis-aligned rectangle. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableParallelogram` | Mutable parallelogram (i.e. a quadrilateral with parallel sides), defined by its `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableParallelogram#center()`, `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableParallelogram#(androidx.ink.geometry.MutableVec,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableParallelogram#height()`, `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableParallelogram#(androidx.ink.geometry.MutableVec,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, and `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableParallelogram#skew()`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableSegment` | Represents a mutable directed line segment between two points. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableTriangle` | Represents a mutable triangle, defined by its three corners `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableTriangle#p0()`, `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableTriangle#p1()` and `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableTriangle#p2()` in order. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableVec` | A mutable two-dimensional vector, i.e. an (x, y) coordinate pair. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Parallelogram` | This class represents a parallelogram defined by its `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Parallelogram#center()`, `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Parallelogram#width()`, `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Parallelogram#height()`, `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Parallelogram#rotationDegrees()`, and `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Parallelogram#skew()`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/PartitionedMesh` | An immutable\*\* complex shape expressed as a set of triangles. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Segment` | Represents a directed line segment between two points. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Triangle` | A triangle defined by its three corners `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Triangle#p0()`, `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Triangle#p1()` and `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Triangle#p2()`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Vec` | A two-dimensional vector, i.e. an (x, y) coordinate pair. | Cmn |

## Objects

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Angle` | A utility for working with a signed angle. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableAffineTransform.Companion` |   | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableBox.Companion` |   | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableVec.Companion` |   | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Intersection` | Contains functions for intersection of ink geometry classes. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/PartitionedMesh.Companion` | Declared as a target for extension functions. | Cmn |

## Annotations

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AngleDegreesFloat` | A signed angle in degrees. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AngleRadiansFloat` | A signed angle in radians. | Cmn |

## Top-level functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableAffineTransform?` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#createAffineTransform(android.graphics.Matrix)(matrix: https://developer.android.com/reference/android/graphics/Matrix.html)` Constructs an `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableAffineTransform` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#createAffineTransform(android.graphics.Matrix)`. | android |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableBox?` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#createBox(android.graphics.RectF)(rect: https://developer.android.com/reference/android/graphics/RectF.html)` Constructs an `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableBox` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#createBox(android.graphics.RectF)`. | android |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableVec` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#createVec(android.graphics.PointF)(point: https://developer.android.com/reference/android/graphics/PointF.html)` Constructs an `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableVec` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#createVec(android.graphics.PointF)`. | android |

## Extension functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/BoxAccumulator` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/BoxAccumulator.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.BoxAccumulator).add(android.graphics.RectF)(rect: https://developer.android.com/reference/android/graphics/RectF.html)` Expands the accumulated bounding box (if necessary) such that it also contains `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.BoxAccumulator).add(android.graphics.RectF)`. | android |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableAffineTransform?` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableAffineTransform.Companion.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableAffineTransform.Companion).from(android.graphics.Matrix)(matrix: https://developer.android.com/reference/android/graphics/Matrix.html)` Constructs an `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableAffineTransform` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableAffineTransform.Companion).from(android.graphics.Matrix)`. | android |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableVec` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableVec.Companion.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableVec.Companion).from(android.graphics.PointF)(point: https://developer.android.com/reference/android/graphics/PointF.html)` Constructs an `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableVec` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableVec.Companion).from(android.graphics.PointF)`. | android |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableBox?` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableBox.Companion.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableBox.Companion).from(android.graphics.RectF)(rect: https://developer.android.com/reference/android/graphics/RectF.html)` Constructs an `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableBox` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableBox.Companion).from(android.graphics.RectF)`. | android |
| `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableAffineTransform` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableAffineTransform.Companion.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableAffineTransform.Companion).from(kotlinx.cinterop.CValue)( transform: https://kotlinlang.org/api/core/kotlin-stdlib/kotlinx.cinterop/-c-value/index.html<platform.CoreGraphics.CGAffineTransform> )` Constructs an `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableAffineTransform` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.ImmutableAffineTransform.Companion).from(kotlinx.cinterop.CValue)`. | N |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/BoxAccumulator.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.BoxAccumulator).getBounds(android.graphics.RectF)(outRect: https://developer.android.com/reference/android/graphics/RectF.html)` Fill the given `https://developer.android.com/reference/android/graphics/RectF.html` with the bounds of this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/BoxAccumulator`, returning whether or not the object was actually overwritten. | android |
| `https://developer.android.com/reference/android/graphics/Path.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/PartitionedMesh.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.PartitionedMesh).outlinesToPath(kotlin.Int)(renderGroupIndex: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a `https://developer.android.com/reference/android/graphics/Path.html` containing the outlines in the render group at `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.PartitionedMesh).outlinesToPath(kotlin.Int)`. | 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/package-summary#(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/MutableVec` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableVec.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableVec).populateFrom(android.graphics.PointF)(point: https://developer.android.com/reference/android/graphics/PointF.html)` Fills this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableVec` with the values from `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableVec).populateFrom(android.graphics.PointF)`. | 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/package-summary#(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://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.AffineTransform).populateMatrix(android.graphics.Matrix)(out: https://developer.android.com/reference/android/graphics/Matrix.html)` Writes the values from this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` to `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.AffineTransform).populateMatrix(android.graphics.Matrix)`. | android |
| `https://developer.android.com/reference/android/graphics/Path.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/PartitionedMesh.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.PartitionedMesh).populateOutlines(kotlin.Int,android.graphics.Path)( renderGroupIndex: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, out: https://developer.android.com/reference/android/graphics/Path.html )` Replaces the contents of `https://developer.android.com/reference/kotlin/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/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.PartitionedMesh).populateOutlines(kotlin.Int,android.graphics.Path)`. | android |
| `https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Vec.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Vec).populatePointF(android.graphics.PointF)(out: https://developer.android.com/reference/android/graphics/PointF.html)` Writes the values from this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Vec` to `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Vec).populatePointF(android.graphics.PointF)`. | android |
| `https://developer.android.com/reference/android/graphics/RectF.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Box.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Box).populateRectF(android.graphics.RectF)(out: https://developer.android.com/reference/android/graphics/RectF.html)` Writes the values from this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Box` to `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Box).populateRectF(android.graphics.RectF)`. | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlinx.cinterop/-c-value/index.html<platform.CoreGraphics.CGAffineTransform>` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.AffineTransform).toCgAffineTransform()()` Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlinx.cinterop/-c-value/index.html` holding a with the values from this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform`. | N |
| `https://developer.android.com/reference/android/graphics/Matrix.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.AffineTransform).toMatrix()()` Constructs a `https://developer.android.com/reference/android/graphics/Matrix.html` with the values from the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform`. | android |
| `https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Vec.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Vec).toPointF()()` Constructs a `https://developer.android.com/reference/android/graphics/PointF.html` with the same coordinates as the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Vec` | android |
| `https://developer.android.com/reference/android/graphics/RectF.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Box.https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Box).toRectF()()` Constructs a `https://developer.android.com/reference/android/graphics/RectF.html` with the same coordinates as the `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Box` | android |

## Top-level functions

### createAffineTransform

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

```
fun createAffineTransform(matrix: Matrix): ImmutableAffineTransform?
```

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

If `https://developer.android.com/reference/kotlin/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/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(android.graphics.Matrix)` overload that takes a pre-allocated `https://developer.android.com/reference/kotlin/androidx/ink/geometry/MutableAffineTransform`, so that the instance can be reused across multiple calls.

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

### createBox

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

```
fun createBox(rect: RectF): ImmutableBox?
```

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

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

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

### createVec

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

```
fun createVec(point: PointF): ImmutableVec
```

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

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

## Extension functions

### BoxAccumulator.add

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

```
fun BoxAccumulator.add(rect: RectF): BoxAccumulator
```

Expands the accumulated bounding box (if necessary) such that it also contains `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.BoxAccumulator).add(android.graphics.RectF)`. If `https://developer.android.com/reference/kotlin/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/kotlin/androidx/ink/geometry/BoxAccumulator` | `this` |

### ImmutableAffineTransform.Companion.from

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

```
fun ImmutableAffineTransform.Companion.from(matrix: Matrix): ImmutableAffineTransform?
```

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

If `https://developer.android.com/reference/kotlin/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/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.MutableAffineTransform).populateFrom(android.graphics.Matrix)` overload that takes a pre-allocated `https://developer.android.com/reference/kotlin/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/kotlin/androidx/ink/geometry/package-summary#createAffineTransform(android.graphics.Matrix)`).

### ImmutableVec.Companion.from

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

```
fun ImmutableVec.Companion.from(point: PointF): ImmutableVec
```

Constructs an `https://developer.android.com/reference/kotlin/androidx/ink/geometry/ImmutableVec` with the values from `https://developer.android.com/reference/kotlin/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/kotlin/androidx/ink/geometry/package-summary#createVec(android.graphics.PointF)`).

### ImmutableBox.Companion.from

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

```
fun ImmutableBox.Companion.from(rect: RectF): ImmutableBox?
```

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

If `https://developer.android.com/reference/kotlin/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/kotlin/androidx/ink/geometry/package-summary#createBox(android.graphics.RectF)`).

### ImmutableAffineTransform.Companion.from

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:from)

```
fun ImmutableAffineTransform.Companion.from(
    transform: CValue<platform.CoreGraphics.CGAffineTransform>
): ImmutableAffineTransform
```

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

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

### BoxAccumulator.getBounds

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

```
fun BoxAccumulator.getBounds(outRect: RectF): Boolean
```

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

### PartitionedMesh.outlinesToPath

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

```
fun PartitionedMesh.outlinesToPath(renderGroupIndex: @IntRange(from = 0) Int): Path
```

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

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

```
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. |

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

```
fun MutableVec.populateFrom(point: PointF): MutableVec
```

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

Leaves `https://developer.android.com/reference/kotlin/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/kotlin/androidx/ink/geometry/MutableVec` | `this` |

### 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` |

### AffineTransform.populateMatrix

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

```
fun AffineTransform.populateMatrix(out: Matrix): Unit
```

Writes the values from this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform` to `https://developer.android.com/reference/kotlin/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 |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.AffineTransform).populateMatrix(android.graphics.Matrix)` |

### PartitionedMesh.populateOutlines

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

```
fun PartitionedMesh.populateOutlines(
    renderGroupIndex: @IntRange(from = 0) Int,
    out: Path
): Path
```

Replaces the contents of `https://developer.android.com/reference/kotlin/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/kotlin/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/android/graphics/Path.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.PartitionedMesh).populateOutlines(kotlin.Int,android.graphics.Path)` |

### Vec.populatePointF

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

```
fun Vec.populatePointF(out: PointF): PointF
```

Writes the values from this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Vec` to `https://developer.android.com/reference/kotlin/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/android/graphics/PointF.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Vec).populatePointF(android.graphics.PointF)` |

### Box.populateRectF

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

```
fun Box.populateRectF(out: RectF): RectF
```

Writes the values from this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/Box` to `https://developer.android.com/reference/kotlin/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/android/graphics/RectF.html` | `https://developer.android.com/reference/kotlin/androidx/ink/geometry/package-summary#(androidx.ink.geometry.Box).populateRectF(android.graphics.RectF)` |

### AffineTransform.toCgAffineTransform

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:toCgAffineTransform)

```
fun AffineTransform.toCgAffineTransform(): CValue<platform.CoreGraphics.CGAffineTransform>
```

Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlinx.cinterop/-c-value/index.html` holding a with the values from this `https://developer.android.com/reference/kotlin/androidx/ink/geometry/AffineTransform`.

### AffineTransform.toMatrix

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

```
fun AffineTransform.toMatrix(): Matrix
```

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

Performance-sensitive code should use the `https://developer.android.com/reference/kotlin/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.

### Vec.toPointF

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

```
fun Vec.toPointF(): PointF
```

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

### Box.toRectF

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

```
fun Box.toRectF(): RectF
```

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