# androidx.graphics.path

*** ** * ** ***

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathIterator` | A path iterator can be used to iterate over all the `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment` that make up a path. |
| `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment` | A path segment represents a curve (line, cubic, quadratic or conic) or a command inside a fully formed `https://developer.android.com/reference/android/graphics/Path.html` object. |

## Enums

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathIterator.ConicEvaluation` |   |
| `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type` | Type of a given segment in a `https://developer.android.com/reference/android/graphics/Path.html`, either a command (`https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type#Move`, `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type#Close`, `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type#Done`) or a curve (`https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type#Line`, `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type#Cubic`, `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type#Quadratic`, `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type#Conic`). |

## Extension functions summary

|---|---|
| `operator https://developer.android.com/reference/kotlin/androidx/graphics/path/PathIterator` | `https://developer.android.com/reference/android/graphics/Path.html.https://developer.android.com/reference/kotlin/androidx/graphics/path/package-summary#(android.graphics.Path).iterator()()` Creates a new `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathIterator` for this `https://developer.android.com/reference/android/graphics/Path.html` that evaluates conics as quadratics. |
| `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathIterator` | `https://developer.android.com/reference/android/graphics/Path.html.https://developer.android.com/reference/kotlin/androidx/graphics/path/package-summary#(android.graphics.Path).iterator(androidx.graphics.path.PathIterator.ConicEvaluation,kotlin.Float)( conicEvaluation: https://developer.android.com/reference/kotlin/androidx/graphics/path/PathIterator.ConicEvaluation, tolerance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Creates a new `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathIterator` for this `https://developer.android.com/reference/android/graphics/Path.html`. |

## Top-level properties summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment` | `https://developer.android.com/reference/kotlin/androidx/graphics/path/package-summary#CloseSegment()` A `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment` containing the `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type#Close` command. |
| `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment` | `https://developer.android.com/reference/kotlin/androidx/graphics/path/package-summary#DoneSegment()` A `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment` containing the `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type#Done` command. |

## Extension functions

### Path.iterator

Artifact: [androidx.graphics:graphics-path](https://developer.android.com/jetpack/androidx/releases/graphics) [View Source](https://cs.android.com/search?q=file:androidx/graphics/path/PathIterator.kt+function:iterator) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/graphics#1.0.0)

```
operator fun Path.iterator(): PathIterator
```

Creates a new `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathIterator` for this `https://developer.android.com/reference/android/graphics/Path.html` that evaluates conics as quadratics. To preserve conics, use the `https://developer.android.com/reference/kotlin/androidx/graphics/path/package-summary#(android.graphics.Path).iterator()` function that takes a `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathIterator.ConicEvaluation` parameter.

### Path.iterator

Artifact: [androidx.graphics:graphics-path](https://developer.android.com/jetpack/androidx/releases/graphics) [View Source](https://cs.android.com/search?q=file:androidx/graphics/path/PathIterator.kt+function:iterator) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/graphics#1.0.0)

```
fun Path.iterator(
    conicEvaluation: PathIterator.ConicEvaluation,
    tolerance: Float = 0.25f
): PathIterator
```

Creates a new `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathIterator` for this `https://developer.android.com/reference/android/graphics/Path.html`. To preserve conics as conics (not convert them to quadratics), set `https://developer.android.com/reference/kotlin/androidx/graphics/path/package-summary#(android.graphics.Path).iterator(androidx.graphics.path.PathIterator.ConicEvaluation,kotlin.Float)` to `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathIterator.ConicEvaluation#AsConic`.

## Top-level properties

### CloseSegment

Artifact: [androidx.graphics:graphics-path](https://developer.android.com/jetpack/androidx/releases/graphics) [View Source](https://cs.android.com/search?q=file:androidx/graphics/path/PathSegment.kt+symbol:CloseSegment)

```
val CloseSegment: PathSegment
```

A `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment` containing the `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type#Close` command. This static object exists to avoid allocating a new segment when returning a `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type#Close` result from `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathIterator#next(kotlin.FloatArray,kotlin.Int)`.

### DoneSegment

Artifact: [androidx.graphics:graphics-path](https://developer.android.com/jetpack/androidx/releases/graphics) [View Source](https://cs.android.com/search?q=file:androidx/graphics/path/PathSegment.kt+symbol:DoneSegment)

```
val DoneSegment: PathSegment
```

A `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment` containing the `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type#Done` command. This static object exists to avoid allocating a new segment when returning a `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathSegment.Type#Done` result from `https://developer.android.com/reference/kotlin/androidx/graphics/path/PathIterator#next(kotlin.FloatArray,kotlin.Int)`.