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

DpRect

public final class DpRect


A four dimensional bounds using Dp for units

Summary

Public constructors

DpRect(@NonNull DpOffset origin, @NonNull DpSize size)

Constructs a DpRect from the top-left origin and the width and height in size.

DpRect(@NonNull Dp left, @NonNull Dp top, @NonNull Dp right, @NonNull Dp bottom)

Public methods

final @NonNull Dp
final @NonNull Dp
final @NonNull Dp
final @NonNull Dp

Extension functions

final @NonNull Dp

A height of this Bounds in Dp.

final @NonNull DpSize

Returns the size of the DpRect.

final @NonNull Dp

A width of this Bounds in Dp.

Public constructors

DpRect

public DpRect(@NonNull DpOffset origin, @NonNull DpSize size)

Constructs a DpRect from the top-left origin and the width and height in size.

DpRect

public DpRect(@NonNull Dp left, @NonNull Dp top, @NonNull Dp right, @NonNull Dp bottom)

Public methods

getBottom

public final @NonNull Dp getBottom()

getLeft

public final @NonNull Dp getLeft()

getRight

public final @NonNull Dp getRight()

getTop

public final @NonNull Dp getTop()

Extension functions

DpKt.getHeight

public final @NonNull Dp DpKt.getHeight(@NonNull DpRect receiver)

A height of this Bounds in Dp.

DpKt.getSize

public final @NonNull DpSize DpKt.getSize(@NonNull DpRect receiver)

Returns the size of the DpRect.

DpKt.getWidth

public final @NonNull Dp DpKt.getWidth(@NonNull DpRect receiver)

A width of this Bounds in Dp.