# PathIterator.Segment

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Methods](https://developer.android.com/reference/android/graphics/PathIterator.Segment#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/graphics/PathIterator.Segment#inhmethods)  

# PathIterator.Segment

*** ** * ** ***

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

`
public
static


class
PathIterator.Segment
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|---------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.graphics.PathIterator.Segment |

<br />

*** ** * ** ***

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

## Summary

|                                                                                    ### Public methods                                                                                    ||
|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` float`   | ` `[getConicWeight](https://developer.android.com/reference/android/graphics/PathIterator.Segment#getConicWeight())`() ` The weight for the conic operation in this segment. |
| ` float[]` | ` `[getPoints](https://developer.android.com/reference/android/graphics/PathIterator.Segment#getPoints())`() ` The point data for this segment.                              |
| ` int`     | ` `[getVerb](https://developer.android.com/reference/android/graphics/PathIterator.Segment#getVerb())`() ` The operation for this segment.                                   |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public methods

### getConicWeight

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

```
public float getConicWeight ()
```

The weight for the conic operation in this segment. If the verb in this segment is not equal to[PathIterator.VERB_CONIC](https://developer.android.com/reference/android/graphics/PathIterator#VERB_CONIC), the weight value is undefined.

<br />

|                                  Returns                                   ||
|---------|-------------------------------------------------------------------|
| `float` | the weight for the conic operation in this segment, if any <br /> |

**See also:**

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

### getPoints

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

```
public float[] getPoints ()
```

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:

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

<br />

<br />

|                                    Returns                                    ||
|-----------|--------------------------------------------------------------------|
| `float[]` | the point data for this segment This value cannot be`null`. <br /> |

### getVerb

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

```
public int getVerb ()
```

The operation for this segment.

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                              Returns                                                                                                                                                                                                                                                                                                                                                                                                                                              ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | the verb which indicates the operation happening in this segment This value cannot be`null`. Value is[PathIterator.VERB_MOVE](https://developer.android.com/reference/android/graphics/PathIterator#VERB_MOVE),[PathIterator.VERB_LINE](https://developer.android.com/reference/android/graphics/PathIterator#VERB_LINE),[PathIterator.VERB_QUAD](https://developer.android.com/reference/android/graphics/PathIterator#VERB_QUAD),[PathIterator.VERB_CONIC](https://developer.android.com/reference/android/graphics/PathIterator#VERB_CONIC),[PathIterator.VERB_CUBIC](https://developer.android.com/reference/android/graphics/PathIterator#VERB_CUBIC),[PathIterator.VERB_CLOSE](https://developer.android.com/reference/android/graphics/PathIterator#VERB_CLOSE), or[PathIterator.VERB_DONE](https://developer.android.com/reference/android/graphics/PathIterator#VERB_DONE) <br /> |