RegionKt

Added in 1.1.0

public final class RegionKt


Summary

Public methods

static final @NonNull Region
and(@NonNull Region receiver, @NonNull Rect r)

Return the intersection of this region and the specified Rect as a new region.

static final @NonNull Region
and(@NonNull Region receiver, @NonNull Region r)

Return the intersection of this region and the specified region as a new region.

static final boolean
contains(@NonNull Region receiver, @NonNull Point p)

Return true if the region contains the specified Point.

static final void
forEach(
    @NonNull Region receiver,
    @NonNull Function1<@NonNull RectUnit> action
)

Performs the given action on each rect in this region.

static final @NonNull Iterator<@NonNull Rect>
iterator(@NonNull Region receiver)

Returns an Iterator over the rects in this region.

static final @NonNull Region
minus(@NonNull Region receiver, @NonNull Rect r)

Return the difference of this region and the specified Rect as a new region.

static final @NonNull Region
minus(@NonNull Region receiver, @NonNull Region r)

Return the difference of this region and the specified region as a new region.

static final @NonNull Region
not(@NonNull Region receiver)

Returns the negation of this region as a new region.

static final @NonNull Region
or(@NonNull Region receiver, @NonNull Rect r)

Return the union of this region and the specified Rect as a new region.

static final @NonNull Region
or(@NonNull Region receiver, @NonNull Region r)

Return the union of this region and the specified region as a new region.

static final @NonNull Region
plus(@NonNull Region receiver, @NonNull Rect r)

Return the union of this region and the specified Rect as a new region.

static final @NonNull Region
plus(@NonNull Region receiver, @NonNull Region r)

Return the union of this region and the specified region as a new region.

static final @NonNull Region

Returns the negation of this region as a new region.

static final @NonNull Region
xor(@NonNull Region receiver, @NonNull Rect r)

Return the union minus the intersection of this region and the specified Rect as a new region.

static final @NonNull Region
xor(@NonNull Region receiver, @NonNull Region r)

Return the union minus the intersection of this region and the specified region as a new region.

Public methods

and

public static final @NonNull Region and(@NonNull Region receiver, @NonNull Rect r)

Return the intersection of this region and the specified Rect as a new region.

and

public static final @NonNull Region and(@NonNull Region receiver, @NonNull Region r)

Return the intersection of this region and the specified region as a new region.

contains

public static final boolean contains(@NonNull Region receiver, @NonNull Point p)

Return true if the region contains the specified Point.

forEach

public static final void forEach(
    @NonNull Region receiver,
    @NonNull Function1<@NonNull RectUnit> action
)

Performs the given action on each rect in this region.

iterator

public static final @NonNull Iterator<@NonNull Rectiterator(@NonNull Region receiver)

Returns an Iterator over the rects in this region.

minus

public static final @NonNull Region minus(@NonNull Region receiver, @NonNull Rect r)

Return the difference of this region and the specified Rect as a new region.

minus

public static final @NonNull Region minus(@NonNull Region receiver, @NonNull Region r)

Return the difference of this region and the specified region as a new region.

not

public static final @NonNull Region not(@NonNull Region receiver)

Returns the negation of this region as a new region.

or

public static final @NonNull Region or(@NonNull Region receiver, @NonNull Rect r)

Return the union of this region and the specified Rect as a new region.

or

public static final @NonNull Region or(@NonNull Region receiver, @NonNull Region r)

Return the union of this region and the specified region as a new region.

plus

public static final @NonNull Region plus(@NonNull Region receiver, @NonNull Rect r)

Return the union of this region and the specified Rect as a new region.

plus

public static final @NonNull Region plus(@NonNull Region receiver, @NonNull Region r)

Return the union of this region and the specified region as a new region.

unaryMinus

public static final @NonNull Region unaryMinus(@NonNull Region receiver)

Returns the negation of this region as a new region.

xor

public static final @NonNull Region xor(@NonNull Region receiver, @NonNull Rect r)

Return the union minus the intersection of this region and the specified Rect as a new region.

xor

public static final @NonNull Region xor(@NonNull Region receiver, @NonNull Region r)

Return the union minus the intersection of this region and the specified region as a new region.