CaptureLayoutRectModifierFieldValue

A ModifierFieldValue that captures layout rectangle (position and size) changes

This class monitors layout rectangle changes of Compose components and captures both position information (x, y coordinates) and size information (width, height) when changes occur. Rectangle information retrieval from multiple coordinate systems is supported, useful when more detailed layout information is needed.

// Rectangle information capture in Root coordinate system
modifier = ModifierFieldValueList().captureLayoutRect()

// Rectangle information capture in Screen coordinate system
modifier = ModifierFieldValueList().captureLayoutRect(CaptureLayoutRectModifierFieldValue.Type.PositionInScreen)

// Direct creation
val captureLayoutRectField = CaptureLayoutRectModifierFieldValue(CaptureLayoutRectModifierFieldValue.Type.BoundsInWindow)

Parameters

initialCaptureType

Initial coordinate system type (default: PositionInRoot)

See also

Constructors

Link copied to clipboard
constructor(initialCaptureType: CaptureLayoutRectModifierFieldValue.Type = Type.PositionInRoot)

Types

Link copied to clipboard

Factory class for creating CaptureLayoutRectModifierFieldValue instances

Link copied to clipboard

Defines coordinate system types for layout rectangle capture

Properties

Functions

Link copied to clipboard
open override fun Builder()

Renders the UI builder interface for configuring this modifier. This composable is typically displayed in the Preview Lab control panel.

Link copied to clipboard
open override fun Modifier.createModifier(): Modifier

Creates a modifier from this field value.

Link copied to clipboard

Combines this modifier field value with another to create a list.