Google は、黒人コミュニティに対する人種平等の促進に取り組んでいます。取り組みを見る

PathUtils

class PathUtils
kotlin.Any
   ↳ androidx.core.graphics.PathUtils

A set of path-related utility methods.

Summary

Public methods
static MutableCollection<PathSegment!>
flatten(@NonNull path: Path)

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

static MutableCollection<PathSegment!>
flatten(@NonNull path: Path, @FloatRange(0) error: Float)

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

Public methods

flatten

@RequiresApi(26) @NonNull static fun flatten(@NonNull path: Path): MutableCollection<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.

flatten

@RequiresApi(26) @NonNull static fun flatten(
    @NonNull path: Path,
    @FloatRange(0) error: Float
): MutableCollection<PathSegment!>

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

Parameters
error 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