PathMeasure
interface PathMeasure
androidx.compose.ui.graphics.PathMeasure |
Summary
Public methods | |
---|---|
abstract Boolean |
getSegment(startDistance: Float, stopDistance: Float, destination: Path, startWithMoveTo: Boolean = true) Given a start and stop distance, return in dst the intervening segment(s). |
abstract Unit |
Assign a new path, or null to have none. |
Properties | |
---|---|
abstract Float |
The total length of the current contour, or 0 if no path is associated with this measure object. |
Public methods
getSegment
abstract fun getSegment(
startDistance: Float,
stopDistance: Float,
destination: Path,
startWithMoveTo: Boolean = true
): Boolean
Given a start and stop distance, return in dst the intervening segment(s). If the segment is zero-length, return false, else return true. startD and stopD are pinned to legal values (0..getLength()). If startD >= stopD then return false (and leave dst untouched). Begin the segment with a moveTo if startWithMoveTo is true.
setPath
abstract fun setPath(
path: Path?,
forceClosed: Boolean
): Unit
Assign a new path, or null to have none.
Properties
length
abstract val length: Float
The total length of the current contour, or 0 if no path is associated with this measure object.