LayoutCoordinates

interface LayoutCoordinates
androidx.ui.core.LayoutCoordinates

A holder of the measured bounds for the layout (MeasureBox).

Summary

Public methods

abstract PxBounds

Returns the child bounding box, discarding clipped rectangles, in local coordinates.

abstract PxPosition

Converts a child layout position into a local position within this layout.

abstract operator IntPx?

Returns the position of an alignment line, or null if the line is not provided.

abstract PxPosition

Converts a global position into a local position within this layout.

abstract PxPosition

Converts a local position within this layout into a global one.

abstract PxPosition

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

Properties

abstract Boolean

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

abstract LayoutCoordinates?

The coordinates of the parent layout.

abstract Set<AlignmentLine>

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

abstract IntPxSize

The size of this layout in the local coordinates space.

Extension properties

From androidx.ui.core
PxBounds

Returns the bounding box of the child in the parent's content area, including any clipping done with respect to the parent.

PxBounds

The boundaries of this layout inside the root composable.

PxBounds

The global boundaries of this layout inside.

PxPosition

The global position of this layout.

PxPosition

Returns the position of the top-left in the parent's content area or (0, 0) for the root.

PxPosition

The position of this layout inside the root composable.

Public methods

childBoundingBox

abstract fun childBoundingBox(child: LayoutCoordinates): PxBounds

Returns the child bounding box, discarding clipped rectangles, in local coordinates.

childToLocal

abstract fun childToLocal(
    child: LayoutCoordinates,
    childLocal: PxPosition
): PxPosition

Converts a child layout position into a local position within this layout.

get

abstract operator fun get(line: AlignmentLine): IntPx?

Returns the position of an alignment line, or null if the line is not provided.

globalToLocal

abstract fun globalToLocal(global: PxPosition): PxPosition

Converts a global position into a local position within this layout.

localToGlobal

abstract fun localToGlobal(local: PxPosition): PxPosition

Converts a local position within this layout into a global one.

localToRoot

abstract fun localToRoot(local: PxPosition): PxPosition

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

Properties

isAttached

abstract val isAttached: Boolean

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

parentCoordinates

abstract val parentCoordinates: LayoutCoordinates?

The coordinates of the parent layout. Null if there is no parent.

providedAlignmentLines

abstract val providedAlignmentLines: Set<AlignmentLine>

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

size

abstract val size: IntPxSize

The size of this layout in the local coordinates space.