# AndroidPath

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/AndroidPath.android.kt+class:androidx.compose.ui.graphics.AndroidPath) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- android

  ```
  class AndroidPath : Path
  ```

*** ** * ** ***

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#AndroidPath(android.graphics.Path)(internalPath: https://developer.android.com/reference/android/graphics/Path.html)` | android |

| ### Public functions |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#addArc(androidx.compose.ui.geometry.Rect,kotlin.Float,kotlin.Float)(oval: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect, startAngleDegrees: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, sweepAngleDegrees: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adds a new subpath with one arc segment that consists of the arc that follows the edge of the oval bounded by the given rectangle, from startAngle degrees around the oval up to startAngle + sweepAngle degrees around the oval, with zero degrees being the point on the right hand side of the oval that crosses the horizontal line that intersects the center of the rectangle and with positive angles going clockwise around the oval. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#addArcRad(androidx.compose.ui.geometry.Rect,kotlin.Float,kotlin.Float)(oval: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect, startAngleRadians: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, sweepAngleRadians: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adds a new subpath with one arc segment that consists of the arc that follows the edge of the oval bounded by the given rectangle, from startAngle radians around the oval up to startAngle + sweepAngle radians around the oval, with zero radians being the point on the right hand side of the oval that crosses the horizontal line that intersects the center of the rectangle and with positive angles going clockwise around the oval. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#addOval(androidx.compose.ui.geometry.Rect)(oval: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect)` Adds a new subpath that consists of a curve that forms the ellipse that fills the given rectangle. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#addOval(androidx.compose.ui.geometry.Rect,androidx.compose.ui.graphics.Path.Direction)(oval: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect, direction: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.Direction)` Adds a new subpath that consists of a curve that forms the ellipse that fills the given rectangle. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#addPath(androidx.compose.ui.graphics.Path,androidx.compose.ui.geometry.Offset)(path: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path, offset: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Adds a new subpath that consists of the given `path` offset by the given `offset`. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#addRect(androidx.compose.ui.geometry.Rect)(rect: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect)` Adds a new subpath that consists of four lines that outline the given rectangle. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#addRect(androidx.compose.ui.geometry.Rect,androidx.compose.ui.graphics.Path.Direction)(rect: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect, direction: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.Direction)` Adds a new subpath that consists of four lines that outline the given rectangle. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#addRoundRect(androidx.compose.ui.geometry.RoundRect)(roundRect: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/RoundRect)` Add a round rectangle shape to the path from the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/RoundRect`. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#addRoundRect(androidx.compose.ui.geometry.RoundRect,androidx.compose.ui.graphics.Path.Direction)(roundRect: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/RoundRect, direction: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.Direction)` Add a round rectangle shape to the path from the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/RoundRect`. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#arcTo(androidx.compose.ui.geometry.Rect,kotlin.Float,kotlin.Float,kotlin.Boolean)( rect: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect, startAngleDegrees: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, sweepAngleDegrees: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, forceMoveTo: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` If the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#arcTo(androidx.compose.ui.geometry.Rect,kotlin.Float,kotlin.Float,kotlin.Boolean)` argument is false, adds a straight line segment and an arc segment. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#close()()` Closes the last subpath, as if a straight line had been drawn from the current point to the first point of the subpath. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#cubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)(x1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, x2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, x3: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y3: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adds a cubic bezier segment that curves from the current point to the given point (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#cubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#cubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`), using the control points (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#cubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#cubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) and (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#cubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#cubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`). | android |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#getBounds()()` Compute the bounds of the control points of the path, and write the answer into bounds. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#lineTo(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)` Adds a straight line segment from the current point to the given point | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#moveTo(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)` Starts a new subpath at the given coordinate | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#op(androidx.compose.ui.graphics.Path,androidx.compose.ui.graphics.Path,androidx.compose.ui.graphics.PathOperation)(path1: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path, path2: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path, operation: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation)` Set this path to the result of applying the Op to the two specified paths. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#quadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)(x1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, x2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adds a quadratic bezier segment that curves from the current point to the given point (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`), using the control point (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`). | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#quadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)(x1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, x2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adds a quadratic bezier segment that curves from the current point to the given point (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`), using the control point (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`). | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#relativeCubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)( dx1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dy1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dx2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dy2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dx3: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dy3: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Adds a cubic bezier segment that curves from the current point to the point at the offset (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeCubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeCubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) from the current point, using the control points at the offsets (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeCubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeCubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) and (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeCubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeCubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) from the current point. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#relativeLineTo(kotlin.Float,kotlin.Float)(dx: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dy: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adds a straight line segment from the current point to the point at the given offset from the current point. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#relativeMoveTo(kotlin.Float,kotlin.Float)(dx: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dy: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Starts a new subpath at the given offset from the current point | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#relativeQuadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)(dx1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dy1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dx2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dy2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adds a quadratic bezier segment that curves from the current point to the point at the offset (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) from the current point, using the control point at the offset (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) from the current point. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#relativeQuadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)(dx1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dy1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dx2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, dy2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Adds a quadratic bezier segment that curves from the current point to the point at the offset (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) from the current point, using the control point at the offset (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) from the current point. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#reset()()` Clears the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` object of all subpaths, returning it to the same state it had when it was created. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#rewind()()` Rewinds the path: clears any lines and curves from the path but keeps the internal data structure for faster reuse. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#transform(androidx.compose.ui.graphics.Matrix)(matrix: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix)` Transform the points in this path by the provided matrix | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#translate(androidx.compose.ui.geometry.Offset)(offset: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Translates all the segments of every subpath by the given offset. | android |

| ### Public properties |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathFillType` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#fillType()` Determines how the interior of this path is calculated. | android |
| `https://developer.android.com/reference/android/graphics/Path.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#internalPath()` | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#isConvex()` Returns the path's convexity, as defined by the content of the path. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath#isEmpty()` Returns true if the path is empty (contains no lines or curves) | android |

| ### Inherited functions |
|---|
| From [androidx.compose.ui.graphics.Path](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path) |---|---|---| | `open infix https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#and(androidx.compose.ui.graphics.Path)(path: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path)` Returns the intersection of two paths as a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`. | android | | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#arcToRad(androidx.compose.ui.geometry.Rect,kotlin.Float,kotlin.Float,kotlin.Boolean)( rect: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect, startAngleRadians: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, sweepAngleRadians: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, forceMoveTo: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` If the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#arcToRad(androidx.compose.ui.geometry.Rect,kotlin.Float,kotlin.Float,kotlin.Boolean)` argument is false, adds a straight line segment and an arc segment. | android | | `open operator https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathIterator` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#iterator()()` Creates a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathIterator` for this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` that evaluates conics as quadratics. | android | | `open https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathIterator` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#iterator(androidx.compose.ui.graphics.PathIterator.ConicEvaluation,kotlin.Float)(conicEvaluation: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathIterator.ConicEvaluation, tolerance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Creates a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathIterator` for this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`. | android | | `open operator https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#minus(androidx.compose.ui.graphics.Path)(path: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path)` Returns the difference of two paths as a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`. | android | | `open infix https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#or(androidx.compose.ui.graphics.Path)(path: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path)` Returns the union of two paths as a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`. | android | | `open operator https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#plus(androidx.compose.ui.graphics.Path)(path: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path)` Returns the union of two paths as a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`. | android | | `open infix https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#xor(androidx.compose.ui.graphics.Path)(path: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path)` Returns the union minus the intersection of two paths as a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`. | android | |

## Public constructors

### AndroidPath

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

```
AndroidPath(internalPath: Path = PlatformPath())
```

## Public functions

### addArc

android

```
open fun addArc(oval: Rect, startAngleDegrees: Float, sweepAngleDegrees: Float): Unit
```

Adds a new subpath with one arc segment that consists of the arc that follows the edge of the oval bounded by the given rectangle, from startAngle degrees around the oval up to startAngle + sweepAngle degrees around the oval, with zero degrees being the point on the right hand side of the oval that crosses the horizontal line that intersects the center of the rectangle and with positive angles going clockwise around the oval.

### addArcRad

android

```
open fun addArcRad(oval: Rect, startAngleRadians: Float, sweepAngleRadians: Float): Unit
```

Adds a new subpath with one arc segment that consists of the arc that follows the edge of the oval bounded by the given rectangle, from startAngle radians around the oval up to startAngle + sweepAngle radians around the oval, with zero radians being the point on the right hand side of the oval that crosses the horizontal line that intersects the center of the rectangle and with positive angles going clockwise around the oval.

### addOval

android

```
open fun addOval(oval: Rect): Unit
```

Adds a new subpath that consists of a curve that forms the ellipse that fills the given rectangle.

To add a circle, pass an appropriate rectangle as `oval`. `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` can be used to easily describe the circle's center `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` and radius.

The oval is wound counter-clockwise.

### addOval

android

```
open fun addOval(oval: Rect, direction: Path.Direction = Direction.CounterClockwise): Unit
```

Adds a new subpath that consists of a curve that forms the ellipse that fills the given rectangle.

To add a circle, pass an appropriate rectangle as `oval`. `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` can be used to easily describe the circle's center `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` and radius.

The direction to wind the rectangle's contour is specified by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#addOval(androidx.compose.ui.geometry.Rect,androidx.compose.ui.graphics.Path.Direction)`.

### addPath

android

```
open fun addPath(path: Path, offset: Offset = Offset.Zero): Unit
```

Adds a new subpath that consists of the given `path` offset by the given `offset`.

### addRect

android

```
open fun addRect(rect: Rect): Unit
```

Adds a new subpath that consists of four lines that outline the given rectangle. The rectangle is wound counter-clockwise.

### addRect

android

```
open fun addRect(rect: Rect, direction: Path.Direction = Direction.CounterClockwise): Unit
```

Adds a new subpath that consists of four lines that outline the given rectangle. The direction to wind the rectangle's contour is specified by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#addRect(androidx.compose.ui.geometry.Rect,androidx.compose.ui.graphics.Path.Direction)`.

### addRoundRect

android

```
open fun addRoundRect(roundRect: RoundRect): Unit
```

Add a round rectangle shape to the path from the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/RoundRect`. The round rectangle is wound counter-clockwise.

### addRoundRect

android

```
open fun addRoundRect(
    roundRect: RoundRect,
    direction: Path.Direction = Direction.CounterClockwise
): Unit
```

Add a round rectangle shape to the path from the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/RoundRect`. The direction to wind the rectangle's contour is specified by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#addRoundRect(androidx.compose.ui.geometry.RoundRect,androidx.compose.ui.graphics.Path.Direction)`.

### arcTo

android

```
open fun arcTo(
    rect: Rect,
    startAngleDegrees: Float,
    sweepAngleDegrees: Float,
    forceMoveTo: Boolean
): Unit
```

If the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#arcTo(androidx.compose.ui.geometry.Rect,kotlin.Float,kotlin.Float,kotlin.Boolean)` argument is false, adds a straight line segment and an arc segment.

If the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#arcTo(androidx.compose.ui.geometry.Rect,kotlin.Float,kotlin.Float,kotlin.Boolean)` argument is true, starts a new subpath consisting of an arc segment.

In either case, the arc segment consists of the arc that follows the edge of the oval bounded by the given rectangle, from startAngle degrees around the oval up to startAngle + sweepAngle degrees around the oval, with zero degrees being the point on the right hand side of the oval that crosses the horizontal line that intersects the center of the rectangle and with positive angles going clockwise around the oval.

The line segment added if `forceMoveTo` is false starts at the current point and ends at the start of the arc.

### close

android

```
open fun close(): Unit
```

Closes the last subpath, as if a straight line had been drawn from the current point to the first point of the subpath.

### cubicTo

android

```
open fun cubicTo(x1: Float, y1: Float, x2: Float, y2: Float, x3: Float, y3: Float): Unit
```

Adds a cubic bezier segment that curves from the current point to the given point (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#cubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#cubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`), using the control points (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#cubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#cubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) and (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#cubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#cubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`).

### getBounds

android

```
open fun getBounds(): Rect
```

Compute the bounds of the control points of the path, and write the answer into bounds. If the path contains 0 or 1 points, the bounds is set to (0,0,0,0)

### lineTo

android

```
open fun lineTo(x: Float, y: Float): Unit
```

Adds a straight line segment from the current point to the given point

### moveTo

android

```
open fun moveTo(x: Float, y: Float): Unit
```

Starts a new subpath at the given coordinate

### op

android

```
open fun op(path1: Path, path2: Path, operation: PathOperation): Boolean
```

Set this path to the result of applying the Op to the two specified paths. The resulting path will be constructed from non-overlapping contours. The curve order is reduced where possible so that cubics may be turned into quadratics, and quadratics maybe turned into lines.

| Parameters |
|---|---|
| `path1: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | The first operand (for difference, the minuend) |
| `path2: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | The second operand (for difference, the subtrahend) |
| `operation: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation` to apply to the 2 specified paths |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if operation succeeded, false otherwise and this path remains unmodified. |

### quadraticBezierTo

android

```
open fun quadraticBezierTo(x1: Float, y1: Float, x2: Float, y2: Float): Unit
```

Adds a quadratic bezier segment that curves from the current point to the given point (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`), using the control point (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`).

### quadraticTo

android

```
open fun quadraticTo(x1: Float, y1: Float, x2: Float, y2: Float): Unit
```

Adds a quadratic bezier segment that curves from the current point to the given point (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`), using the control point (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`).

### relativeCubicTo

android

```
open fun relativeCubicTo(
    dx1: Float,
    dy1: Float,
    dx2: Float,
    dy2: Float,
    dx3: Float,
    dy3: Float
): Unit
```

Adds a cubic bezier segment that curves from the current point to the point at the offset (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeCubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeCubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) from the current point, using the control points at the offsets (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeCubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeCubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) and (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeCubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeCubicTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) from the current point.

### relativeLineTo

android

```
open fun relativeLineTo(dx: Float, dy: Float): Unit
```

Adds a straight line segment from the current point to the point at the given offset from the current point.

### relativeMoveTo

android

```
open fun relativeMoveTo(dx: Float, dy: Float): Unit
```

Starts a new subpath at the given offset from the current point

### relativeQuadraticBezierTo

android

```
open fun relativeQuadraticBezierTo(dx1: Float, dy1: Float, dx2: Float, dy2: Float): Unit
```

Adds a quadratic bezier segment that curves from the current point to the point at the offset (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) from the current point, using the control point at the offset (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) from the current point.

### relativeQuadraticTo

android

```
open fun relativeQuadraticTo(dx1: Float, dy1: Float, dx2: Float, dy2: Float): Unit
```

Adds a quadratic bezier segment that curves from the current point to the point at the offset (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) from the current point, using the control point at the offset (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)`) from the current point.

### reset

android

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

Clears the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` object of all subpaths, returning it to the same state it had when it was created. The *current point* is reset to the origin. This does NOT change the fill-type setting.

### rewind

android

```
open fun rewind(): Unit
```

Rewinds the path: clears any lines and curves from the path but keeps the internal data structure for faster reuse.

### transform

android

```
open fun transform(matrix: Matrix): Unit
```

Transform the points in this path by the provided matrix

### translate

android

```
open fun translate(offset: Offset): Unit
```

Translates all the segments of every subpath by the given offset.

## Public properties

### fillType

android

```
open var fillType: PathFillType
```

Determines how the interior of this path is calculated.

Defaults to the non-zero winding rule, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathFillType#NonZero()`.

### internalPath

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

```
val internalPath: Path
```

### isConvex

android

```
open val isConvex: Boolean
```

Returns the path's convexity, as defined by the content of the path.

A path is convex if it has a single contour, and only ever curves in a single direction.

This function will calculate the convexity of the path from its control points, and cache the result.

### isEmpty

android

```
open val isEmpty: Boolean
```

Returns true if the path is empty (contains no lines or curves)

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if the path is empty (contains no lines or curves) |