Stay organized with collections
Save and categorize content based on your preferences.
PathIterator.Segment
public
static
class
PathIterator.Segment
extends Object
This class holds the data for a given segment in a path, as returned by
PathIterator.next()
.
Summary
Public methods |
float
|
getConicWeight()
The weight for the conic operation in this segment.
|
float[]
|
getPoints()
The point data for this segment.
|
int
|
getVerb()
The operation for this segment.
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(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(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()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public methods
getConicWeight
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
, the weight value is undefined.
Returns |
float |
the weight for the conic operation in this segment, if any |
getPoints
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:
Returns |
float[] |
the point data for this segment
This value cannot be null . |
getVerb
public int getVerb ()
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# PathIterator.Segment\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nPathIterator.Segment\n====================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/graphics/PathIterator.Segment \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\nclass\nPathIterator.Segment\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|---------------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.graphics.PathIterator.Segment |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThis class holds the data for a given segment in a path, as returned by\n[PathIterator.next()](/reference/android/graphics/PathIterator#next()).\n\nSummary\n-------\n\n| ### Public methods ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` float` | ` `[getConicWeight](/reference/android/graphics/PathIterator.Segment#getConicWeight())`() ` The weight for the conic operation in this segment. |\n| ` float[]` | ` `[getPoints](/reference/android/graphics/PathIterator.Segment#getPoints())`() ` The point data for this segment. |\n| ` int` | ` `[getVerb](/reference/android/graphics/PathIterator.Segment#getVerb())`() ` The operation for this segment. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/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](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/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](/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](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nPublic methods\n--------------\n\n### getConicWeight\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic float getConicWeight ()\n```\n\nThe weight for the conic operation in this segment. If the verb in this segment\nis not equal to [PathIterator.VERB_CONIC](/reference/android/graphics/PathIterator#VERB_CONIC), the weight value is undefined.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|-------------------------------------------------------------------|\n| `float` | the weight for the conic operation in this segment, if any \u003cbr /\u003e |\n\n**See also:**\n\n- [Path.conicTo(float, float, float, float, float)](/reference/android/graphics/Path#conicTo(float,%20float,%20float,%20float,%20float)) \n\n### getPoints\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic float[] getPoints ()\n```\n\nThe point data for this segment.\n\nEach two floats represent the data for a single point of that operation.\nThe number of pairs of floats supplied in the resulting array depends on the verb:\n\n- [PathIterator.VERB_MOVE](/reference/android/graphics/PathIterator#VERB_MOVE): 1 pair (indices 0 to 1)\n- [PathIterator.VERB_LINE](/reference/android/graphics/PathIterator#VERB_LINE): 2 pairs (indices 0 to 3)\n- [PathIterator.VERB_QUAD](/reference/android/graphics/PathIterator#VERB_QUAD): 3 pairs (indices 0 to 5)\n- [PathIterator.VERB_CONIC](/reference/android/graphics/PathIterator#VERB_CONIC): 4 pairs (indices 0 to 7), the last pair contains the conic weight twice\n- [PathIterator.VERB_CUBIC](/reference/android/graphics/PathIterator#VERB_CUBIC): 4 pairs (indices 0 to 7)\n- [PathIterator.VERB_CLOSE](/reference/android/graphics/PathIterator#VERB_CLOSE): 0 pairs\n- [PathIterator.VERB_DONE](/reference/android/graphics/PathIterator#VERB_DONE): 0 pairs\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|---------------------------------------------------------------------|\n| `float[]` | the point data for this segment This value cannot be `null`. \u003cbr /\u003e |\n\n### getVerb\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic int getVerb ()\n```\n\nThe operation for this segment.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | the verb which indicates the operation happening in this segment This value cannot be `null`. Value is [PathIterator.VERB_MOVE](/reference/android/graphics/PathIterator#VERB_MOVE), [PathIterator.VERB_LINE](/reference/android/graphics/PathIterator#VERB_LINE), [PathIterator.VERB_QUAD](/reference/android/graphics/PathIterator#VERB_QUAD), [PathIterator.VERB_CONIC](/reference/android/graphics/PathIterator#VERB_CONIC), [PathIterator.VERB_CUBIC](/reference/android/graphics/PathIterator#VERB_CUBIC), [PathIterator.VERB_CLOSE](/reference/android/graphics/PathIterator#VERB_CLOSE), or [PathIterator.VERB_DONE](/reference/android/graphics/PathIterator#VERB_DONE) \u003cbr /\u003e |"]]