PathKt

public final class PathKt


Summary

Public methods

static final @RequiresApi(value = "19") @NonNull Path
PathKt.and(@NonNull Path receiver, @NonNull Path p)

Returns the intersection of two paths as a new Path.

static final @RequiresApi(value = "26") @NonNull Iterable<@NonNull PathSegment>
PathKt.flatten(@NonNull Path receiver, float error)

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

static final @RequiresApi(value = "19") @NonNull Path
PathKt.minus(@NonNull Path receiver, @NonNull Path p)

Returns the difference of two paths as a new Path.

static final @RequiresApi(value = "19") @NonNull Path
PathKt.or(@NonNull Path receiver, @NonNull Path p)

Returns the union of two paths as a new Path.

static final @RequiresApi(value = "19") @NonNull Path
PathKt.plus(@NonNull Path receiver, @NonNull Path p)

Returns the union of two paths as a new Path.

static final @RequiresApi(value = "19") @NonNull Path
PathKt.xor(@NonNull Path receiver, @NonNull Path p)

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

Public methods

PathKt.and

@RequiresApi(value = "19")
@NonNull
public static final @RequiresApi(value = "19") Path PathKt.and(@NonNull Path receiver, @NonNull Path p)

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

PathKt.flatten

@RequiresApi(value = "26")
@NonNull
public static final @RequiresApi(value = "26") Iterable<@NonNull PathSegmentPathKt.flatten(@NonNull Path receiver, float error)

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

Parameters
float 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
approximate

PathKt.minus

@RequiresApi(value = "19")
@NonNull
public static final @RequiresApi(value = "19") Path PathKt.minus(@NonNull Path receiver, @NonNull Path p)

Returns the difference of two paths as a new Path.

PathKt.or

@RequiresApi(value = "19")
@NonNull
public static final @RequiresApi(value = "19") Path PathKt.or(@NonNull Path receiver, @NonNull Path p)

Returns the union of two paths as a new Path.

PathKt.plus

@RequiresApi(value = "19")
@NonNull
public static final @RequiresApi(value = "19") Path PathKt.plus(@NonNull Path receiver, @NonNull Path p)

Returns the union of two paths as a new Path.

PathKt.xor

@RequiresApi(value = "19")
@NonNull
public static final @RequiresApi(value = "19") Path PathKt.xor(@NonNull Path receiver, @NonNull Path p)

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