Segment
open class Segment
kotlin.Any | |
↳ | android.graphics.PathIterator.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 |
getVerb() 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:
VERB_MOVE
: 1 pair (indices 0 to 1)VERB_LINE
: 2 pairs (indices 0 to 3)VERB_QUAD
: 3 pairs (indices 0 to 5)VERB_CONIC
: 4 pairs (indices 0 to 7), the last pair contains the conic weight twiceVERB_CUBIC
: 4 pairs (indices 0 to 7)VERB_CLOSE
: 0 pairsVERB_DONE
: 0 pairs
Return | |
---|---|
FloatArray |
the point data for this segment This value cannot be null . |
getVerb
open fun getVerb(): Int
The operation for this segment.
Return | |
---|---|
Int |
the verb which indicates the operation happening in this segment This value cannot be null . Value is android.graphics.PathIterator#VERB_MOVE , android.graphics.PathIterator#VERB_LINE , android.graphics.PathIterator#VERB_QUAD , android.graphics.PathIterator#VERB_CONIC , android.graphics.PathIterator#VERB_CUBIC , android.graphics.PathIterator#VERB_CLOSE , or android.graphics.PathIterator#VERB_DONE |