flatten

@RequiresApi(value = 26)
@NonNull
open fun flatten(@NonNull path: @NonNull Path): @NonNull Collection<PathSegment>(source)

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 to flatten.

See also


@RequiresApi(value = 26)
@NonNull
open fun flatten(@NonNull path: @NonNull Path, @FloatRange(from = 0) error: Float): @NonNull Collection<PathSegment>(source)

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

Parameters

path

path to flatten.

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.

See also