# calculateOuterBoundsInRoot

> Calculates the bounds of this layout in root coordinates, including all of its modifiers (padding, size, border, and so on), writing the result into [rect].

## API Reference

### calculateOuterBoundsInRoot

> Source set: Common

```kotlin
public fun LayoutInfo.calculateOuterBoundsInRoot(rect: MutableRect)
```

Calculates the bounds of this layout in root coordinates, including all of its modifiers
(padding, size, border, and so on), writing the result into `rect`. Bounds are not clipped.

These are the bounds the layout occupies in its parent, transformed to the root. If this layout
isn't attached, `rect` is set to `(0, 0, 0, 0)`.

#### Parameters

| | |
| --- | --- |
| rect | The [MutableRect](https://composables.com/jetpack-compose/androidx.compose.ui/ui-geometry/functions/MutableRect/api.md) into which the bounds are written. |
