{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

LookaheadLayoutCoordinates

@ExperimentalComposeUiApi
public sealed interface LookaheadLayoutCoordinates extends LayoutCoordinates


LookaheadLayoutCoordinates interface holds layout coordinates from both the lookahead calculation and the post-lookahead layout pass.

Summary

Inherited methods

From androidx.compose.ui.layout.LayoutCoordinates
abstract int
get(@NonNull AlignmentLine alignmentLine)

Returns the position in pixels of an alignment line, or AlignmentLine.Unspecified if the line is not provided.

abstract LayoutCoordinates

The coordinates of the parent layout modifier or parent layout if there is no parent layout modifier, or null if there is no parent.

abstract LayoutCoordinates

The coordinates of the parent layout.

abstract @NonNull Set<@NonNull AlignmentLine>

The alignment lines provided for this layout, not including inherited lines.

abstract @NonNull IntSize

The size of this layout in the local coordinates space.

abstract boolean

Returns false if the corresponding layout was detached from the hierarchy.

abstract @NonNull Rect
localBoundingBoxOf(
    @NonNull LayoutCoordinates sourceCoordinates,
    boolean clipBounds
)

Returns the bounding box of sourceCoordinates in the local coordinates.

abstract @NonNull Offset
localPositionOf(
    @NonNull LayoutCoordinates sourceCoordinates,
    @NonNull Offset relativeToSource
)

Converts an relativeToSource in sourceCoordinates space into local coordinates.

abstract @NonNull Offset
localToRoot(@NonNull Offset relativeToLocal)

Converts a local position within this layout into an offset from the root composable.

abstract @NonNull Offset
localToWindow(@NonNull Offset relativeToLocal)

Converts relativeToLocal position within this layout into an Offset relative to the window's origin.

default void
transformFrom(
    @NonNull LayoutCoordinates sourceCoordinates,
    @NonNull Matrix matrix
)

Modifies matrix to be a transform to convert a coordinate in sourceCoordinates to a coordinate in this LayoutCoordinates.

abstract @NonNull Offset
windowToLocal(@NonNull Offset relativeToWindow)

Converts relativeToWindow relative to the window's origin into an Offset relative to this layout.