---
title: "DpRect"
description: "A four dimensional bounds using [Dp] for units"
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
data class DpRect(
    @Stable val left: Dp,
    @Stable val top: Dp,
    @Stable val right: Dp,
    @Stable val bottom: Dp,
)
```


A four dimensional bounds using `Dp` for units


## Secondary Constructors

```kotlin
constructor(
    origin: DpOffset,
    size: DpSize,
) : this(origin.x, origin.y, origin.x + size.width, origin.y + size.height)
```


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


## Companion Object



