Google is committed to advancing racial equity for Black communities. See how.

AndroidPathMeasure

class AndroidPathMeasure : PathMeasure
kotlin.Any
   ↳ androidx.compose.ui.graphics.AndroidPathMeasure

Summary

Public methods
Boolean
getSegment(startDistance: Float, stopDistance: Float, destination: Path, startWithMoveTo: Boolean)

Given a start and stop distance, return in dst the intervening segment(s).

Unit
setPath(path: Path?, forceClosed: Boolean)

Assign a new path, or null to have none.

Properties
Float

The total length of the current contour, or 0 if no path is associated with this measure object.

Public methods

getSegment

fun getSegment(
    startDistance: Float,
    stopDistance: Float,
    destination: Path,
    startWithMoveTo: Boolean
): 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

fun setPath(
    path: Path?,
    forceClosed: Boolean
): Unit

Assign a new path, or null to have none.

Properties

length

val length: Float

The total length of the current contour, or 0 if no path is associated with this measure object.