Stay organized with collections
Save and categorize content based on your preferences.
Classes
PathIterator |
A path iterator can be used to iterate over all the segments that make up a path.
|
PathSegment |
A path segment represents a curve (line, cubic, quadratic or conic) or a command inside a fully formed path object.
|
Enums
Extension functions summary
Top-level properties summary
Extension functions
Top-level properties
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-15 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-15 UTC."],[],[],null,["# androidx.graphics.path\n======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/androidx/graphics/path/package-summary \"View this page in Java\")\n\nClasses\n-------\n\n|-----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [PathIterator](/reference/kotlin/androidx/graphics/path/PathIterator) | A path iterator can be used to iterate over all the [segments](/reference/kotlin/androidx/graphics/path/PathSegment) that make up a path. |\n| [PathSegment](/reference/kotlin/androidx/graphics/path/PathSegment) | A path segment represents a curve (line, cubic, quadratic or conic) or a command inside a fully formed [path](https://developer.android.com/reference/android/graphics/Path.html) object. |\n\nEnums\n-----\n\n|-------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [PathIterator.ConicEvaluation](/reference/kotlin/androidx/graphics/path/PathIterator.ConicEvaluation) | |\n| [PathSegment.Type](/reference/kotlin/androidx/graphics/path/PathSegment.Type) | Type of a given segment in a [path](https://developer.android.com/reference/android/graphics/Path.html), either a command ([Type.Move](/reference/kotlin/androidx/graphics/path/PathSegment.Type#Move), [Type.Close](/reference/kotlin/androidx/graphics/path/PathSegment.Type#Close), [Type.Done](/reference/kotlin/androidx/graphics/path/PathSegment.Type#Done)) or a curve ([Type.Line](/reference/kotlin/androidx/graphics/path/PathSegment.Type#Line), [Type.Cubic](/reference/kotlin/androidx/graphics/path/PathSegment.Type#Cubic), [Type.Quadratic](/reference/kotlin/androidx/graphics/path/PathSegment.Type#Quadratic), [Type.Conic](/reference/kotlin/androidx/graphics/path/PathSegment.Type#Conic)). |\n\nExtension functions summary\n---------------------------\n\n|----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `operator `[PathIterator](/reference/kotlin/androidx/graphics/path/PathIterator) | [Path](https://developer.android.com/reference/android/graphics/Path.html)`.`[iterator](/reference/kotlin/androidx/graphics/path/package-summary#(android.graphics.Path).iterator())`()` Creates a new [PathIterator](/reference/kotlin/androidx/graphics/path/PathIterator) for this [path](https://developer.android.com/reference/android/graphics/Path.html) that evaluates conics as quadratics. |\n| [PathIterator](/reference/kotlin/androidx/graphics/path/PathIterator) | [Path](https://developer.android.com/reference/android/graphics/Path.html)`.`[iterator](/reference/kotlin/androidx/graphics/path/package-summary#(android.graphics.Path).iterator(androidx.graphics.path.PathIterator.ConicEvaluation,kotlin.Float))`(` ` conicEvaluation: `[PathIterator.ConicEvaluation](/reference/kotlin/androidx/graphics/path/PathIterator.ConicEvaluation)`,` ` tolerance: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) `)` Creates a new [PathIterator](/reference/kotlin/androidx/graphics/path/PathIterator) for this [path](https://developer.android.com/reference/android/graphics/Path.html). |\n\nTop-level properties summary\n----------------------------\n\n|---------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [PathSegment](/reference/kotlin/androidx/graphics/path/PathSegment) | [CloseSegment](/reference/kotlin/androidx/graphics/path/package-summary#CloseSegment()) A [PathSegment](/reference/kotlin/androidx/graphics/path/PathSegment) containing the [Close](/reference/kotlin/androidx/graphics/path/PathSegment.Type#Close) command. |\n| [PathSegment](/reference/kotlin/androidx/graphics/path/PathSegment) | [DoneSegment](/reference/kotlin/androidx/graphics/path/package-summary#DoneSegment()) A [PathSegment](/reference/kotlin/androidx/graphics/path/PathSegment) containing the [Done](/reference/kotlin/androidx/graphics/path/PathSegment.Type#Done) command. |\n\nExtension functions\n-------------------\n\n### iterator\n\nArtifact: [androidx.graphics:graphics-path](/jetpack/androidx/releases/graphics) \n[View Source](https://cs.android.com/search?q=file:androidx/graphics/path/PathIterator.kt+function:iterator) \nAdded in [1.0.0](/jetpack/androidx/releases/graphics#1.0.0) \n\n```\noperator fun Path.iterator(): PathIterator\n```\n\nCreates a new [PathIterator](/reference/kotlin/androidx/graphics/path/PathIterator) for this [path](https://developer.android.com/reference/android/graphics/Path.html) that evaluates conics as quadratics. To preserve conics, use the [Path.iterator](/reference/kotlin/androidx/graphics/path/package-summary#(android.graphics.Path).iterator()) function that takes a [PathIterator.ConicEvaluation](/reference/kotlin/androidx/graphics/path/PathIterator.ConicEvaluation) parameter. \n\n### iterator\n\nArtifact: [androidx.graphics:graphics-path](/jetpack/androidx/releases/graphics) \n[View Source](https://cs.android.com/search?q=file:androidx/graphics/path/PathIterator.kt+function:iterator) \nAdded in [1.0.0](/jetpack/androidx/releases/graphics#1.0.0) \n\n```\nfun Path.iterator(\n conicEvaluation: PathIterator.ConicEvaluation,\n tolerance: Float = 0.25f\n): PathIterator\n```\n\nCreates a new [PathIterator](/reference/kotlin/androidx/graphics/path/PathIterator) for this [path](https://developer.android.com/reference/android/graphics/Path.html). To preserve conics as conics (not convert them to quadratics), set [conicEvaluation](/reference/kotlin/androidx/graphics/path/package-summary#(android.graphics.Path).iterator(androidx.graphics.path.PathIterator.ConicEvaluation,kotlin.Float)) to [PathIterator.ConicEvaluation.AsConic](/reference/kotlin/androidx/graphics/path/PathIterator.ConicEvaluation#AsConic).\n\nTop-level properties\n--------------------\n\n### CloseSegment\n\nArtifact: [androidx.graphics:graphics-path](/jetpack/androidx/releases/graphics) \n[View Source](https://cs.android.com/search?q=file:androidx/graphics/path/PathSegment.kt+symbol:CloseSegment) \n\n```\nval CloseSegment: PathSegment\n```\n\nA [PathSegment](/reference/kotlin/androidx/graphics/path/PathSegment) containing the [Close](/reference/kotlin/androidx/graphics/path/PathSegment.Type#Close) command. This static object exists to avoid allocating a new segment when returning a [Close](/reference/kotlin/androidx/graphics/path/PathSegment.Type#Close) result from [PathIterator.next](/reference/kotlin/androidx/graphics/path/PathIterator#next(kotlin.FloatArray,kotlin.Int)). \n\n### DoneSegment\n\nArtifact: [androidx.graphics:graphics-path](/jetpack/androidx/releases/graphics) \n[View Source](https://cs.android.com/search?q=file:androidx/graphics/path/PathSegment.kt+symbol:DoneSegment) \n\n```\nval DoneSegment: PathSegment\n```\n\nA [PathSegment](/reference/kotlin/androidx/graphics/path/PathSegment) containing the [Done](/reference/kotlin/androidx/graphics/path/PathSegment.Type#Done) command. This static object exists to avoid allocating a new segment when returning a [Done](/reference/kotlin/androidx/graphics/path/PathSegment.Type#Done) result from [PathIterator.next](/reference/kotlin/androidx/graphics/path/PathIterator#next(kotlin.FloatArray,kotlin.Int))."]]