flatten

@RequiresApi(value = 26)
fun Path.flatten(error: Float = 0.5f): Iterable<PathSegment>(source)

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

Parameters

error

The acceptable error for a line on the Path in pixels. Typically this would be 0.5 so that the error is less than half a pixel. This value must be positive and is set to 0.5 by default.

See also