CaptureLayoutRectModifierFieldValue
class CaptureLayoutRectModifierFieldValue(initialCaptureType: CaptureLayoutRectModifierFieldValue.Type = Type.PositionInRoot) : ModifierFieldValue
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)Content copied to clipboard
Parameters
initialCaptureType
Initial coordinate system type (default: PositionInRoot)
See also
Types
Functions
Link copied to clipboard
Renders the UI builder interface for configuring this modifier. This composable is typically displayed in the Preview Lab control panel.
Link copied to clipboard
Creates a modifier from this field value.
Link copied to clipboard
Combines this modifier field value with another to create a list.