PathUtils

Added in 1.1.0

class PathUtils


A set of path-related utility methods.

Summary

Public functions

java-static (Mutable)Collection<PathSegment!>
@RequiresApi(value = 26)
flatten(path: Path)

Flattens (or approximate) a Path with a series of line segments using a 0.5 pixel error.

java-static (Mutable)Collection<PathSegment!>
@RequiresApi(value = 26)
flatten(path: Path, error: @FloatRange(from = 0) Float)

Flattens (or approximate) a Path with a series of line segments.

Public functions

flatten

Added in 1.1.0
@RequiresApi(value = 26)
java-static fun flatten(path: Path): (Mutable)Collection<PathSegment!>

Flattens (or approximate) a Path with a series of line segments using a 0.5 pixel error. Note: This method requires API 26 or newer.

Parameters
path: Path

path to flatten.

See also
flatten

flatten

Added in 1.1.0
@RequiresApi(value = 26)
java-static fun flatten(path: Path, error: @FloatRange(from = 0) Float): (Mutable)Collection<PathSegment!>

Flattens (or approximate) a Path with a series of line segments. Note: This method requires API 26 or newer.

Parameters
path: Path

path to flatten.

error: @FloatRange(from = 0) Float

The acceptable error for a line on the Path. Typically this would be 0.5 so that the error is less than half a pixel.

See also
approximate