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

Extensions for android.graphics.Path

and

infix fun Path.and(p: Path): Path

Returns the union of two paths as a new Path.

flatten

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

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

minus

operator fun Path.minus(p: Path): Path

Returns the difference of two paths as a new Path.

or

infix fun Path.or(p: Path): Path

Returns the intersection of two paths as a new Path. If the paths do not intersect, returns an empty path.

plus

operator fun Path.plus(p: Path): Path

Returns the union of two paths as a new Path.

xor

infix fun Path.xor(p: Path): Path

Returns the union minus the intersection of two paths as a new Path.