RectKt

public final class RectKt


Summary

Public methods

static final @NonNull Rect
RectKt.and(Rect receiver, Rect r)

Returns the intersection of two rectangles as a new rectangle.

static final @NonNull RectF
RectKt.and(RectF receiver, RectF r)

Returns the intersection of two rectangles as a new rectangle.

static final int

Returns "left", the first component of the rectangle.

static final float

Returns "left", the first component of the rectangle.

static final int

Returns "top", the second component of the rectangle.

static final float

Returns "top", the second component of the rectangle.

static final int

Returns "right", the third component of the rectangle.

static final float

Returns "right", the third component of the rectangle.

static final int

Returns "bottom", the fourth component of the rectangle.

static final float

Returns "bottom", the fourth component of the rectangle.

static final boolean
RectKt.contains(Rect receiver, Point p)

Returns true if the specified point is inside the rectangle.

static final boolean
RectKt.contains(RectF receiver, PointF p)

Returns true if the specified point is inside the rectangle.

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

Returns the difference of this rectangle and the specified rectangle as a new region.

static final @NonNull Region
RectKt.minus(RectF receiver, RectF r)

Returns the difference of this rectangle and the specified rectangle as a new region.

static final @NonNull Rect
RectKt.minus(Rect receiver, int xy)

Returns a new rectangle representing this rectangle offset by the negation of the specified amount on both X and Y axis.

static final @NonNull RectF
RectKt.minus(RectF receiver, float xy)

Returns a new rectangle representing this rectangle offset by the negation of the specified amount on both X and Y axis.

static final @NonNull Rect
RectKt.minus(Rect receiver, Point xy)

Returns a new rectangle representing this rectangle offset by the negation of the specified point.

static final @NonNull RectF
RectKt.minus(RectF receiver, PointF xy)

Returns a new rectangle representing this rectangle offset by the negation of the specified point.

static final @NonNull Rect
RectKt.or(Rect receiver, Rect r)

Returns the union of two rectangles as a new rectangle.

static final @NonNull RectF
RectKt.or(RectF receiver, RectF r)

Returns the union of two rectangles as a new rectangle.

static final @NonNull Rect
RectKt.plus(Rect receiver, Rect r)

Performs the union of this rectangle and the specified rectangle and returns the result as a new rectangle.

static final @NonNull RectF
RectKt.plus(RectF receiver, RectF r)

Performs the union of this rectangle and the specified rectangle and returns the result as a new rectangle.

static final @NonNull Rect
RectKt.plus(Rect receiver, int xy)

Returns a new rectangle representing this rectangle offset by the specified amount on both X and Y axis.

static final @NonNull RectF
RectKt.plus(RectF receiver, float xy)

Returns a new rectangle representing this rectangle offset by the specified amount on both X and Y axis.

static final @NonNull Rect
RectKt.plus(Rect receiver, Point xy)

Returns a new rectangle representing this rectangle offset by the specified point.

static final @NonNull RectF
RectKt.plus(RectF receiver, PointF xy)

Returns a new rectangle representing this rectangle offset by the specified point.

static final @NonNull Rect
RectKt.times(Rect receiver, int factor)

Returns a new rectangle representing this rectangle's components each scaled by factor.

static final @NonNull RectF
RectKt.times(RectF receiver, int factor)

Returns a new rectangle representing this rectangle's components each scaled by factor.

static final @NonNull RectF