core-ktx / androidx.graphics / android.graphics.Path / flatten

flatten

fun Path.flatten(error: Float = 0.5f): Iterable<PathSegment>

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

Parameters

error - 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. This value must be positive and is set to 0.5 by default.

See Also

Path.approximate