# LayoutCoordinates

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/layout/LayoutCoordinates.kt+class:androidx.compose.ui.layout.LayoutCoordinates) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface LayoutCoordinates
  ```

*** ** * ** ***

A holder of the measured bounds for the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Layout.composable#Layout(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.ui.layout.MeasurePolicy)`.

## Summary

| ### Public functions |
|---|---|---|
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#get(androidx.compose.ui.layout.AlignmentLine)(alignmentLine: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/AlignmentLine)` Returns the position in pixels of an `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/AlignmentLine`, or `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/AlignmentLine#Unspecified()` if the line is not provided. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localBoundingBoxOf(androidx.compose.ui.layout.LayoutCoordinates,kotlin.Boolean)( sourceCoordinates: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates, clipBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Returns the bounding box of `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localBoundingBoxOf(androidx.compose.ui.layout.LayoutCoordinates,kotlin.Boolean)` in the local coordinates. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset)( sourceCoordinates: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates, relativeToSource: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset )` Converts an `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset)` in `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset)` space into local coordinates. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset,kotlin.Boolean)( sourceCoordinates: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates, relativeToSource: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, includeMotionFrameOfReference: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Converts an `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset,kotlin.Boolean)` in `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset,kotlin.Boolean)` space into local coordinates. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localToRoot(androidx.compose.ui.geometry.Offset)(relativeToLocal: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Converts a local position within this layout into an offset from the root composable. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localToScreen(androidx.compose.ui.geometry.Offset)(relativeToLocal: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Converts `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localToScreen(androidx.compose.ui.geometry.Offset)` position within this layout into an `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` relative to the device's screen. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localToWindow(androidx.compose.ui.geometry.Offset)(relativeToLocal: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Converts `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localToWindow(androidx.compose.ui.geometry.Offset)` position within this layout into an `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` relative to the window's origin. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#screenToLocal(androidx.compose.ui.geometry.Offset)(relativeToScreen: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Converts `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#screenToLocal(androidx.compose.ui.geometry.Offset)` relative to the device's screen's origin into an `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` relative to this layout. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#transformFrom(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.graphics.Matrix)(sourceCoordinates: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates, matrix: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix)` Modifies `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#transformFrom(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.graphics.Matrix)` to be a transform to convert a coordinate in `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#transformFrom(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.graphics.Matrix)` to a coordinate in `this` `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#transformToScreen(androidx.compose.ui.graphics.Matrix)(matrix: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix)` Takes a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#transformToScreen(androidx.compose.ui.graphics.Matrix)` which transforms some coordinate system `C` to local coordinates, and updates the matrix to transform from `C` to screen coordinates instead. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#windowToLocal(androidx.compose.ui.geometry.Offset)(relativeToWindow: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Converts `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#windowToLocal(androidx.compose.ui.geometry.Offset)` relative to the window's origin into an `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` relative to this layout. | Cmn |

| ### Public properties |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#introducesMotionFrameOfReference()` Indicates whether the corresponding Layout is expected to change its `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` in small increments (such as when its parent is a `Scroll`). | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#isAttached()` Returns false if the corresponding layout was detached from the hierarchy. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#parentCoordinates()` The coordinates of the parent layout modifier or parent layout if there is no parent layout modifier, or `null` if there is no parent. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#parentLayoutCoordinates()` The coordinates of the parent layout. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/AlignmentLine>` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#providedAlignmentLines()` The alignment lines provided for this layout, not including inherited lines. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#size()` The size of this layout in the local coordinates space. | Cmn |

| ### Extension functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates.https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#(androidx.compose.ui.layout.LayoutCoordinates).boundsInParent()()` Returns the bounding box of the child in the parent's content area, including any clipping done with respect to the parent. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates.https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#(androidx.compose.ui.layout.LayoutCoordinates).boundsInRoot()()` The boundaries of this layout inside the root composable. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates.https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#(androidx.compose.ui.layout.LayoutCoordinates).boundsInWindow(kotlin.Boolean)(clipBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` The boundaries of this layout relative to the window's origin. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates.https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#(androidx.compose.ui.layout.LayoutCoordinates).findRootCoordinates()()` Walks up the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` hierarchy to find the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` whose `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#parentCoordinates()` is `null` and returns it. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates.https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#(androidx.compose.ui.layout.LayoutCoordinates).positionInParent()()` Returns the position of the top-left in the parent's content area or (0, 0) for the root. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates.https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#(androidx.compose.ui.layout.LayoutCoordinates).positionInRoot()()` The position of this layout inside the root composable. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates.https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#(androidx.compose.ui.layout.LayoutCoordinates).positionInWindow()()` The position of this layout relative to the window. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates.https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#(androidx.compose.ui.layout.LayoutCoordinates).positionOnScreen()()` The position of this layout on the device's screen. | Cmn |

## Public functions

### get

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
operator fun get(alignmentLine: AlignmentLine): Int
```

Returns the position in pixels of an `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/AlignmentLine`, or `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/AlignmentLine#Unspecified()` if the line is not provided.

### localBoundingBoxOf

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun localBoundingBoxOf(
    sourceCoordinates: LayoutCoordinates,
    clipBounds: Boolean = true
): Rect
```

Returns the bounding box of `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localBoundingBoxOf(androidx.compose.ui.layout.LayoutCoordinates,kotlin.Boolean)` in the local coordinates. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localBoundingBoxOf(androidx.compose.ui.layout.LayoutCoordinates,kotlin.Boolean)` is `true`, any clipping that occurs between `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localBoundingBoxOf(androidx.compose.ui.layout.LayoutCoordinates,kotlin.Boolean)` and this layout will affect the returned bounds, and can even result in an empty rectangle if clipped regions do not overlap. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localBoundingBoxOf(androidx.compose.ui.layout.LayoutCoordinates,kotlin.Boolean)` is false, the bounding box of `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localBoundingBoxOf(androidx.compose.ui.layout.LayoutCoordinates,kotlin.Boolean)` will be converted to local coordinates irrespective of any clipping applied between the layouts.

When rotation or scaling is applied, the bounding box of the rotated or scaled value will be computed in the local coordinates. For example, if a 40 pixels x 20 pixel layout is rotated 90 degrees, the bounding box will be 20 pixels x 40 pixels in its parent's coordinates.

### localPositionOf

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun localPositionOf(
    sourceCoordinates: LayoutCoordinates,
    relativeToSource: Offset
): Offset
```

Converts an `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset)` in `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset)` space into local coordinates. `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset)` may be any `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` that belong to the same compose layout hierarchy.

By default, includes the `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` when `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#introducesMotionFrameOfReference()` is `true`. But you may exclude it from the calculation by using the overload that takes `includeMotionFrameOfReference` and passing it as `false`.

### localPositionOf

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun localPositionOf(
    sourceCoordinates: LayoutCoordinates,
    relativeToSource: Offset = Offset.Zero,
    includeMotionFrameOfReference: Boolean = true
): Offset
```

Converts an `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset,kotlin.Boolean)` in `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset,kotlin.Boolean)` space into local coordinates. `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset,kotlin.Boolean)` may be any `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` that belong to the same compose layout hierarchy.

Use `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset,kotlin.Boolean)` to decide whether to include the `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` of any `LayoutCoordinate` that returns `true` in the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset,kotlin.Boolean)` flag.

In other words, passing `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset,kotlin.Boolean)` as `false`, returns a calculation that excludes the `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` set from Layouts that place their children using `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable.PlacementScope#withMotionFrameOfReferencePlacement(kotlin.Function1)`.

### localToRoot

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun localToRoot(relativeToLocal: Offset): Offset
```

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

### localToScreen

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun localToScreen(relativeToLocal: Offset): Offset
```

Converts `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localToScreen(androidx.compose.ui.geometry.Offset)` position within this layout into an `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` relative to the device's screen. Returns `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset#Unspecified()` if the conversion cannot be performed.

### localToWindow

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun localToWindow(relativeToLocal: Offset): Offset
```

Converts `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localToWindow(androidx.compose.ui.geometry.Offset)` position within this layout into an `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` relative to the window's origin.

### screenToLocal

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun screenToLocal(relativeToScreen: Offset): Offset
```

Converts `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#screenToLocal(androidx.compose.ui.geometry.Offset)` relative to the device's screen's origin into an `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` relative to this layout. Returns `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset#Unspecified()` if the conversion cannot be performed.

### transformFrom

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun transformFrom(sourceCoordinates: LayoutCoordinates, matrix: Matrix): Unit
```

Modifies `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#transformFrom(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.graphics.Matrix)` to be a transform to convert a coordinate in `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#transformFrom(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.graphics.Matrix)` to a coordinate in `this` `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates`.

### transformToScreen

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun transformToScreen(matrix: Matrix): Unit
```

Takes a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#transformToScreen(androidx.compose.ui.graphics.Matrix)` which transforms some coordinate system `C` to local coordinates, and updates the matrix to transform from `C` to screen coordinates instead.

### windowToLocal

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun windowToLocal(relativeToWindow: Offset): Offset
```

Converts `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#windowToLocal(androidx.compose.ui.geometry.Offset)` relative to the window's origin into an `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` relative to this layout.

## Public properties

### introducesMotionFrameOfReference

Cmn Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
open val introducesMotionFrameOfReference: Boolean
```

Indicates whether the corresponding Layout is expected to change its `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` in small increments (such as when its parent is a `Scroll`).

In those situations, the corresponding placed `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` will have their `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#introducesMotionFrameOfReference()` return `true`.

Custom Layouts that are expected to have similar behaviors should place their children using `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable.PlacementScope#withMotionFrameOfReferencePlacement(kotlin.Function1)`.

You may then use `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset)` with `includeMotionFrameOfReference = false` to query a Layout's position such that it excludes all `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` introduced by those Layouts.

This is typically helpful when deciding when to animate an `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/approachLayout.modifier#(androidx.compose.ui.Modifier).approachLayout(kotlin.Function1,kotlin.Function2,kotlin.Function3)` using `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LookaheadScope` coordinates. As you probably don't want to trigger animations on small positional increments.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable.PlacementScope#withMotionFrameOfReferencePlacement(kotlin.Function1)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#localPositionOf(androidx.compose.ui.layout.LayoutCoordinates,androidx.compose.ui.geometry.Offset)` |   |

### isAttached

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val isAttached: Boolean
```

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

### parentCoordinates

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val parentCoordinates: 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.

### parentLayoutCoordinates

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val parentLayoutCoordinates: LayoutCoordinates?
```

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

### providedAlignmentLines

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val providedAlignmentLines: Set<AlignmentLine>
```

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

### size

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val size: IntSize
```

The size of this layout in the local coordinates space.

## Extension functions

### LayoutCoordinates.boundsInParent

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/layout/LayoutCoordinates.kt+function:boundsInParent)

```
fun LayoutCoordinates.boundsInParent(): Rect
```

Returns the bounding box of the child in the parent's content area, including any clipping done with respect to the parent. For the root, the bounds is positioned at (0, 0) and sized to the size of the root.

### LayoutCoordinates.boundsInRoot

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/layout/LayoutCoordinates.kt+function:boundsInRoot)

```
fun LayoutCoordinates.boundsInRoot(): Rect
```

The boundaries of this layout inside the root composable.

### LayoutCoordinates.boundsInWindow

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/layout/LayoutCoordinates.kt+function:boundsInWindow)

```
fun LayoutCoordinates.boundsInWindow(clipBounds: Boolean = true): Rect
```

The boundaries of this layout relative to the window's origin.

| Parameters |
|---|---|
| `clipBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | Whether to clip the bounds of the layout to the window's boundaries. If `true`, any clipping that occurs between this layout and the window will affect the returned bounds, and can even result in an empty rectangle if clipped regions do not overlap. If `false`, the bounding box of this layout will be converted to window coordinates irrespective of any clipping applied. Defaults to `true`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` representing the bounding box of this `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` in the window's coordinate space. If the bounds are completely clipped, returns `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect#Zero()`. |

### LayoutCoordinates.findRootCoordinates

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/layout/LayoutCoordinates.kt+function:findRootCoordinates)

```
fun LayoutCoordinates.findRootCoordinates(): LayoutCoordinates
```

Walks up the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` hierarchy to find the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` whose `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#parentCoordinates()` is `null` and returns it. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates#isAttached()`, this will have the size of the androidx.compose.ui.platform.ComposeView.

### LayoutCoordinates.positionInParent

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/layout/LayoutCoordinates.kt+function:positionInParent)

```
fun LayoutCoordinates.positionInParent(): Offset
```

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

### LayoutCoordinates.positionInRoot

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/layout/LayoutCoordinates.kt+function:positionInRoot)

```
fun LayoutCoordinates.positionInRoot(): Offset
```

The position of this layout inside the root composable.

### LayoutCoordinates.positionInWindow

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/layout/LayoutCoordinates.kt+function:positionInWindow)

```
fun LayoutCoordinates.positionInWindow(): Offset
```

The position of this layout relative to the window.

### LayoutCoordinates.positionOnScreen

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/layout/LayoutCoordinates.kt+function:positionOnScreen)

```
fun LayoutCoordinates.positionOnScreen(): Offset
```

The position of this layout on the device's screen. Returns `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset#Unspecified()` if the conversion cannot be performed.