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


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


<h2 id="tocomposerect">toComposeRect</h2>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
fun android.graphics.Rect.toComposeRect(): androidx.compose.ui.geometry.Rect
```


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





<hr class="docs-overload-divider">


<h2 id="tocomposerect-2">toComposeRect</h2>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
fun android.graphics.RectF.toComposeRect(): Rect
```


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