{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

RectHelperKt

public final class RectHelperKt


Summary

Public methods

static final @NonNull Rect

Creates a new instance of android.graphics.Rect with the same bounds specified in the given IntRect

static final @NonNull Rect

This method is deprecated. Converting Rect to android.graphics.Rect is lossy, and requires rounding.

static final @NonNull RectF

Creates a new instance of android.graphics.RectF with the same bounds specified in the given Rect

static final @NonNull IntRect

Creates a new instance of androidx.compose.ui.unit.IntRect with the same bounds specified in the given android.graphics.Rect

static final @NonNull Rect

Creates a new instance of androidx.compose.ui.geometry.Rect with the same bounds specified in the given android.graphics.Rect

Public methods

toAndroidRect

public static final @NonNull Rect toAndroidRect(@NonNull IntRect receiver)

Creates a new instance of android.graphics.Rect with the same bounds specified in the given IntRect

toAndroidRect

public static final @NonNull Rect toAndroidRect(@NonNull Rect receiver)

Creates a new instance of android.graphics.Rect with the same bounds specified in the given Rect

toAndroidRectF

public static final @NonNull RectF toAndroidRectF(@NonNull Rect receiver)

Creates a new instance of android.graphics.RectF with the same bounds specified in the given Rect

toComposeIntRect

public static final @NonNull IntRect toComposeIntRect(@NonNull Rect receiver)

Creates a new instance of androidx.compose.ui.unit.IntRect with the same bounds specified in the given android.graphics.Rect

toComposeRect

public static final @NonNull Rect toComposeRect(@NonNull Rect receiver)

Creates a new instance of androidx.compose.ui.geometry.Rect with the same bounds specified in the given android.graphics.Rect