# Path

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

  ```
  interface Path
  ```
Known direct subclasses [AndroidPath](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/AndroidPath` |   |

*** ** * ** ***

## Summary

| ### Nested types |
|---|
| `enum https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.Direction : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-enum/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.Direction>` Specifies how closed shapes (e.g. rectangles, ovals) are wound (oriented) when they are added to a path. |

| ### Public companion functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#combine(androidx.compose.ui.graphics.PathOperation,androidx.compose.ui.graphics.Path,androidx.compose.ui.graphics.Path)(operation: https://developer.android.com/reference/kotlin/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)` Combines the two paths according to the manner specified by the given `operation`. | Cmn |

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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`. | Cmn |
| `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`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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. | Cmn |
| `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. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#close()()` Closes the last subpath, as if a straight line had been drawn from the current point to the first point of the subpath. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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)`). | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#getBounds()()` Compute the bounds of the control points of the path, and write the answer into bounds. | Cmn |
| `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. | Cmn |
| `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`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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 | Cmn |
| `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`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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 | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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. | Cmn |
| `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`. | Cmn |
| `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`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[quadraticBezierTo](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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)` **This function is deprecated.** Use quadraticTo() for consistency with cubicTo() | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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)`). | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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 | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[relativeQuadraticBezierTo](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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)` **This function is deprecated.** Use relativeQuadraticTo() for consistency with relativeCubicTo() | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#rewind()()` Rewinds the path: clears any lines and curves from the path but keeps the internal data structure for faster reuse. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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 | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#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. | Cmn |
| `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`. | Cmn |

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

| ### Extension functions |
|---|---|---|
| `inline https://developer.android.com/reference/android/graphics/Path.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#(androidx.compose.ui.graphics.Path).asAndroidPath()()` | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#(androidx.compose.ui.graphics.Path).addOutline(androidx.compose.ui.graphics.Outline)(outline: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline)` Adds the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).addOutline(androidx.compose.ui.graphics.Outline)` to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.Direction` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#(androidx.compose.ui.graphics.Path).computeDirection()()` Computes this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`'s direction (or winding, or orientation), which can be either `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.Direction#Clockwise` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.Direction#CounterClockwise`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path>` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#(androidx.compose.ui.graphics.Path).divide(kotlin.collections.MutableList)(contours: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path>)` Divides this path into a list of paths. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#(androidx.compose.ui.graphics.Path).reverse(androidx.compose.ui.graphics.Path)(destination: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path)` Reverses the segments of this path into the specified `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).reverse(androidx.compose.ui.graphics.Path)`, turning a clockwise path into a counter-clockwise path and vice-versa. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#(androidx.compose.ui.graphics.Path).copy()()` Create a new path, copying the contents from the src path. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#(androidx.compose.ui.graphics.Path).addSvg(kotlin.String)(pathData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Adds the specified SVG [path data](https://www.w3.org/TR/SVG2/paths.html#PathData) to this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#(androidx.compose.ui.graphics.Path).toSvg(kotlin.Boolean)(asDocument: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns an SVG representation of this path. | Cmn |

## Public companion functions

### combine

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

```
fun combine(operation: PathOperation, path1: Path, path2: Path): Path
```

Combines the two paths according to the manner specified by the given `operation`.

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.

Throws `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` if the combining operation fails.

## Public functions

### addArc

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

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

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

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

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

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

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

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

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

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

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

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

### and

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

```
open infix fun and(path: Path): Path
```

Returns the intersection of two paths as a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`. If the paths do not intersect, returns an empty path.

### arcTo

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

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

### arcToRad

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

```
open fun arcToRad(
    rect: Rect,
    startAngleRadians: Float,
    sweepAngleRadians: Float,
    forceMoveTo: Boolean
): Unit
```

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.

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

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

### close

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

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

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

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

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

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

### iterator

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

```
open operator fun iterator(): PathIterator
```

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. To preserve conics, use the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#iterator()` function that takes a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathIterator.ConicEvaluation` parameter.

### iterator

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

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

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`. To preserve conics as conics (not convert them to quadratics), set `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#iterator(androidx.compose.ui.graphics.PathIterator.ConicEvaluation,kotlin.Float)` to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathIterator.ConicEvaluation#AsConic`.

| Parameters |
|---|---|
| `conicEvaluation: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathIterator.ConicEvaluation` | Indicates how to evaluate conic segments |
| `tolerance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 0.25f` | When `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#iterator(androidx.compose.ui.graphics.PathIterator.ConicEvaluation,kotlin.Float)` is set to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathIterator.ConicEvaluation#AsQuadratics` defines the maximum distance between the original conic curve and its quadratic approximations |

### lineTo

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

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

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

### minus

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

```
open operator fun minus(path: Path): Path
```

Returns the difference of two paths as a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`.

### moveTo

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

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

Starts a new subpath at the given coordinate

### op

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

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

### or

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

```
open infix fun or(path: Path): Path
```

Returns the union of two paths as a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`.

### plus

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

```
open operator fun plus(path: Path): Path
```

Returns the union of two paths as a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`.

### quadraticBezierTo

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

```
fun [quadraticBezierTo](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#quadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float))(x1: Float, y1: Float, x2: Float, y2: Float): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use quadraticTo() for consistency with cubicTo(), use this instead:
>
> ```kotlin
> quadraticTo(x1, y1, x2, y2)
> ```

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

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

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

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

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

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

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

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

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

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

### relativeQuadraticBezierTo

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

```
fun [relativeQuadraticBezierTo](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#relativeQuadraticBezierTo(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float))(dx1: Float, dy1: Float, dx2: Float, dy2: Float): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use relativeQuadraticTo() for consistency with relativeCubicTo(), use this instead:
>
> ```kotlin
> relativeQuadraticTo(dx1, dy1, dx2, dy2)
> ```

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

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

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

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

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

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

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

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

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

Transform the points in this path by the provided matrix

### translate

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

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

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

### xor

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

```
open infix fun xor(path: Path): Path
```

Returns the union minus the intersection of two paths as a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`.

## Public properties

### fillType

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

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

### isConvex

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

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

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

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

## Extension functions

### Path.asAndroidPath

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

```
inline fun Path.asAndroidPath(): Path
```

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unsupported-operation-exception/index.html` | if this Path is not backed by an `https://developer.android.com/reference/android/graphics/Path.html`. |

### Path.addOutline

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

```
fun Path.addOutline(outline: Outline): Unit
```

Adds the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).addOutline(androidx.compose.ui.graphics.Outline)` to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`.

### Path.computeDirection

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

```
fun Path.computeDirection(): Path.Direction
```

Computes this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`'s direction (or winding, or orientation), which can be either `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.Direction#Clockwise` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.Direction#CounterClockwise`.

If the path is made of multiple contours (the path contains multiple "move" commands), the direction returned by this property is the direction of the first contour.

If the path is empty (contains no lines/curves), the direction is `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.Direction#Clockwise`.

If the path has no area (single straight line), the direction is `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path.Direction#Clockwise`.

Calling this property does not cache the result, the direction is computed Calling this method does not cache the result, the direction is computed every time the method is called.

If you need to query the direction of individual contours, you should `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).divide(kotlin.collections.MutableList)` the path first.

### Path.divide

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

```
fun Path.divide(contours: MutableList<Path> = mutableListOf()): MutableList<Path>
```

Divides this path into a list of paths. Each contour inside this path is returned as a separate `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`. For instance the following code snippet creates two rectangular contours:

```kotlin
val p = Path()
p.addRect(...)
p.addRect(...)

val contours = p.divide()
```

The list returned by calling `p.divide()` will contain two `Path` instances, each representing one of the two rectangles.

Empty contours (contours with no lines/curves) are omitted from the resulting list.

| Parameters |
|---|---|
| `contours: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path> = mutableListOf()` | An optional mutable list of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` that will hold the result of the division. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path>` | A list of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` representing all the contours in this path. The returned list is either a newly allocated list if the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).divide(kotlin.collections.MutableList)` parameter was left unspecified, or the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).divide(kotlin.collections.MutableList)` parameter. |

### Path.reverse

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

```
fun Path.reverse(destination: Path = Path()): Path
```

Reverses the segments of this path into the specified `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).reverse(androidx.compose.ui.graphics.Path)`, turning a clockwise path into a counter-clockwise path and vice-versa. Each contour in the path is reversed independently, and the contours appear in the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).reverse(androidx.compose.ui.graphics.Path)` in reverse order.

This method preserves the general structure of this path as much as possible:

- Lines become lines

- Quadratic Bézier curves become quadratic Bézier curves

- Cubic Bézier curves become cubic Bézier curves

- Close and move commands remain close and move commands

- Conic segments become quadratic Bézier curves

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` containing the reverse of this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`. The returned path is either a newly allocated `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` if the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).reverse(androidx.compose.ui.graphics.Path)` parameter was left unspecified, or the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).reverse(androidx.compose.ui.graphics.Path)` parameter. |

### Path.copy

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

```
fun Path.copy(): Path
```

Create a new path, copying the contents from the src path.

### Path.addSvg

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

```
fun Path.addSvg(pathData: String): Unit
```

Adds the specified SVG [path data](https://www.w3.org/TR/SVG2/paths.html#PathData) to this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path`. The SVG path data encodes a series of instructions that will be applied to this path. For instance, the following path data:

`M200,300 Q400,50 600,300 L1000,300`

Will generate the following series of instructions for this path:

```kotlin
moveTo(200f, 300f)
quadraticTo(400f, 50f, 600f, 300f)
lineTo(1000f, 300f)
```

To convert a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` to its SVG path data representation, please refer to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).toSvg(kotlin.Boolean)`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the path data contains an invalid instruction |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).toSvg(kotlin.Boolean)` |   |

### Path.toSvg

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

```
fun Path.toSvg(asDocument: Boolean = false): String
```

Returns an SVG representation of this path. The caller can choose whether the returned SVG represents a fully-formed SVG document or only the [path data](https://www.w3.org/TR/SVG2/paths.html#PathData). By default, only the path data is returned which can be used either with `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).addSvg(kotlin.String)` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/PathParser`.

| Parameters |
|---|---|
| `asDocument: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | When set to true, this function returns a fully-formed SVG document, otherwise returns only the path data. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/PathParser` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Path).addSvg(kotlin.String)` |   |