# PathIterator.Segment

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Segment

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/graphics/PathIterator.Segment "View this page in Java")  

```
open class Segment
```

|---|--------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                 ||
| ↳ | [android.graphics.PathIterator.Segment](https://developer.android.com/reference/kotlin/android/graphics/PathIterator.Segment#) |

This class holds the data for a given segment in a path, as returned by[next()](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#next()).

## Summary

|                                                                                                                                 Public methods                                                                                                                                 ||
|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)            | [getConicWeight](https://developer.android.com/reference/kotlin/android/graphics/PathIterator.Segment#getConicWeight())`()` The weight for the conic operation in this segment. |
| open[FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html) | [getPoints](https://developer.android.com/reference/kotlin/android/graphics/PathIterator.Segment#getPoints())`()` The point data for this segment.                              |
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                | [getVerb](https://developer.android.com/reference/kotlin/android/graphics/PathIterator.Segment#getVerb())`()` The operation for this segment.                                   |

## Public methods

### getConicWeight

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
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](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_CONIC:kotlin.Int), the weight value is undefined.

|                                                                   Return                                                                   ||
|--------------------------------------------------------------------------------|------------------------------------------------------------|
| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | the weight for the conic operation in this segment, if any |

**See Also**

- [android.graphics.Path#conicTo(float, float, float, float, float)](https://developer.android.com/reference/kotlin/android/graphics/Path#conicTo(kotlin.Float,%20kotlin.Float,%20kotlin.Float,%20kotlin.Float,%20kotlin.Float))  

### getPoints

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

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

- [VERB_MOVE](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_MOVE:kotlin.Int): 1 pair (indices 0 to 1)
- [VERB_LINE](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_LINE:kotlin.Int): 2 pairs (indices 0 to 3)
- [VERB_QUAD](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_QUAD:kotlin.Int): 3 pairs (indices 0 to 5)
- [VERB_CONIC](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_CONIC:kotlin.Int): 4 pairs (indices 0 to 7), the last pair contains the conic weight twice
- [VERB_CUBIC](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_CUBIC:kotlin.Int): 4 pairs (indices 0 to 7)
- [VERB_CLOSE](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_CLOSE:kotlin.Int): 0 pairs
- [VERB_DONE](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_DONE:kotlin.Int): 0 pairs

<br />

|                                                                         Return                                                                         ||
|-------------------------------------------------------------------------------------------|-------------------------------------------------------------|
| [FloatArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float-array/index.html) | the point data for this segment This value cannot be`null`. |

### getVerb

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getVerb(): Int
```

The operation for this segment.

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Return                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ||
|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [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](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_MOVE:kotlin.Int),[android.graphics.PathIterator#VERB_LINE](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_LINE:kotlin.Int),[android.graphics.PathIterator#VERB_QUAD](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_QUAD:kotlin.Int),[android.graphics.PathIterator#VERB_CONIC](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_CONIC:kotlin.Int),[android.graphics.PathIterator#VERB_CUBIC](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_CUBIC:kotlin.Int),[android.graphics.PathIterator#VERB_CLOSE](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_CLOSE:kotlin.Int), or[android.graphics.PathIterator#VERB_DONE](https://developer.android.com/reference/kotlin/android/graphics/PathIterator#VERB_DONE:kotlin.Int) |