Function

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.

calculateOuterBoundsInRoot

Source set: Common
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 into which the bounds are written.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: