Stay organized with collections
Save and categorize content based on your preferences.
Segment
open class Segment
This class holds the data for a given segment in a path, as returned by next()
.
Summary
Public methods |
open Float |
The weight for the conic operation in this segment.
|
open FloatArray |
The point data for this segment.
|
open Int |
The operation for this segment.
|
Public methods
getConicWeight
open fun getConicWeight(): Float
The weight for the conic operation in this segment. If the verb in this segment is not equal to VERB_CONIC
, the weight value is undefined.
Return |
Float |
the weight for the conic operation in this segment, if any |
getPoints
open fun getPoints(): FloatArray
The point data for this segment. Each two floats represent the data for a single point of that operation. The number of pairs of floats supplied in the resulting array depends on the verb:
Return |
FloatArray |
the point data for this segment This value cannot be null . |
getVerb
open fun getVerb(): Int
The operation for this segment.
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-02-10 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-02-10 UTC."],[],[],null,["# PathIterator.Segment\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nSegment\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/graphics/PathIterator.Segment \"View this page in Java\") \n\n```\nopen class Segment\n```\n\n|---|--------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.graphics.PathIterator.Segment](#) |\n\nThis class holds the data for a given segment in a path, as returned by [next()](/reference/kotlin/android/graphics/PathIterator#next()).\n\nSummary\n-------\n\n| Public methods ||\n|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|\n| open [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | [getConicWeight](#getConicWeight())`()` The weight for the conic operation in this segment. |\n| open [FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html) | [getPoints](#getPoints())`()` The point data for this segment. |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getVerb](#getVerb())`()` The operation for this segment. |\n\nPublic methods\n--------------\n\n### getConicWeight\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getConicWeight(): Float\n```\n\nThe weight for the conic operation in this segment. If the verb in this segment is not equal to [VERB_CONIC](/reference/kotlin/android/graphics/PathIterator#VERB_CONIC:kotlin.Int), the weight value is undefined.\n\n| Return ||\n|--------------------------------------------------------------------------------|------------------------------------------------------------|\n| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | the weight for the conic operation in this segment, if any |\n\n**See Also**\n\n- [android.graphics.Path#conicTo(float, float, float, float, float)](/reference/kotlin/android/graphics/Path#conicTo(kotlin.Float,%20kotlin.Float,%20kotlin.Float,%20kotlin.Float,%20kotlin.Float)) \n\n### getPoints\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getPoints(): FloatArray\n```\n\nThe point data for this segment. Each two floats represent the data for a single point of that operation. The number of pairs of floats supplied in the resulting array depends on the verb:\n\n- [VERB_MOVE](/reference/kotlin/android/graphics/PathIterator#VERB_MOVE:kotlin.Int): 1 pair (indices 0 to 1)\n- [VERB_LINE](/reference/kotlin/android/graphics/PathIterator#VERB_LINE:kotlin.Int): 2 pairs (indices 0 to 3)\n- [VERB_QUAD](/reference/kotlin/android/graphics/PathIterator#VERB_QUAD:kotlin.Int): 3 pairs (indices 0 to 5)\n- [VERB_CONIC](/reference/kotlin/android/graphics/PathIterator#VERB_CONIC:kotlin.Int): 4 pairs (indices 0 to 7), the last pair contains the conic weight twice\n- [VERB_CUBIC](/reference/kotlin/android/graphics/PathIterator#VERB_CUBIC:kotlin.Int): 4 pairs (indices 0 to 7)\n- [VERB_CLOSE](/reference/kotlin/android/graphics/PathIterator#VERB_CLOSE:kotlin.Int): 0 pairs\n- [VERB_DONE](/reference/kotlin/android/graphics/PathIterator#VERB_DONE:kotlin.Int): 0 pairs\n\n\u003cbr /\u003e\n\n| Return ||\n|-------------------------------------------------------------------------------------------|--------------------------------------------------------------|\n| [FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html) | the point data for this segment This value cannot be `null`. |\n\n### getVerb\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getVerb(): Int\n```\n\nThe operation for this segment.\n\n| Return ||\n|----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the verb which indicates the operation happening in this segment This value cannot be `null`. Value is [android.graphics.PathIterator#VERB_MOVE](/reference/kotlin/android/graphics/PathIterator#VERB_MOVE:kotlin.Int), [android.graphics.PathIterator#VERB_LINE](/reference/kotlin/android/graphics/PathIterator#VERB_LINE:kotlin.Int), [android.graphics.PathIterator#VERB_QUAD](/reference/kotlin/android/graphics/PathIterator#VERB_QUAD:kotlin.Int), [android.graphics.PathIterator#VERB_CONIC](/reference/kotlin/android/graphics/PathIterator#VERB_CONIC:kotlin.Int), [android.graphics.PathIterator#VERB_CUBIC](/reference/kotlin/android/graphics/PathIterator#VERB_CUBIC:kotlin.Int), [android.graphics.PathIterator#VERB_CLOSE](/reference/kotlin/android/graphics/PathIterator#VERB_CLOSE:kotlin.Int), or [android.graphics.PathIterator#VERB_DONE](/reference/kotlin/android/graphics/PathIterator#VERB_DONE:kotlin.Int) |"]]