# Placeable

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/Placeable.kt+class:androidx.compose.ui.layout.Placeable) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  abstract class Placeable : Measured
  ```

*** ** * ** ***

A `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` corresponds to a child layout that can be positioned by its parent layout. Most `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable`s are the result of a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Measurable#measure(androidx.compose.ui.unit.Constraints)` call.

A `Placeable` should never be stored between measure calls.

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/PlacementScopeMarker abstract class https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable.PlacementScope : https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density` Receiver scope that permits explicit placement of a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable`. |

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#Placeable()()` | Cmn |

| ### Protected functions |
|---|---|---|
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,kotlin.Function1)(position: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntOffset, zIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, layerBlock: (https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?)` Place a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` at `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,kotlin.Function1)` in its parent's coordinate system. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,androidx.compose.ui.graphics.layer.GraphicsLayer)(position: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntOffset, zIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, layer: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer)` Place a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` at `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,androidx.compose.ui.graphics.layer.GraphicsLayer)` in its parent's coordinate system. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#height()` The height, in pixels, of the measured layout, as seen by the parent. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#measuredHeight()` The measured height of the layout. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#measuredWidth()` The measured width of the layout. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#width()` The width, in pixels, of the measured layout, as seen by the parent. | Cmn |

| ### Protected properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntOffset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#apparentToRealOffset()` The offset to be added to an apparent position assigned to this `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` to make it real. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#measuredSize()` The measured size of this Placeable. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#measurementConstraints()` The constraints used for the measurement made to obtain this `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable`. | Cmn |

| ### Inherited functions |
|---|
| From [androidx.compose.ui.layout.Measured](https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Measured) |---|---|---| | `abstract operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Measured#get(androidx.compose.ui.layout.AlignmentLine)(alignmentLine: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/AlignmentLine)` Returns the position 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 | |

| ### Inherited properties |
|---|
| From [androidx.compose.ui.layout.Measured](https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Measured) |---|---|---| | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Measured#parentData()` Data provided by the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ParentDataModifier` applied to the layout. | Cmn | |

## Public constructors

### Placeable

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

```
Placeable()
```

## Protected functions

### placeAt

Cmn

```
protected abstract fun placeAt(position: IntOffset, zIndex: Float, layerBlock: (GraphicsLayerScope.() -> Unit)?): Unit
```

Place a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` at `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,kotlin.Function1)` in its parent's coordinate system.

| Parameters |
|---|---|
| `position: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntOffset` | position in the parent's coordinate system. |
| `zIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | controls the drawing order for the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable`. A `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` with larger `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,kotlin.Function1)` will be drawn on top of all the children with smaller `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,kotlin.Function1)`. When children have the same `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,kotlin.Function1)` the order in which the items were placed is used. |
| `layerBlock: (https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?` | when non-null this `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` should be placed with an introduced graphic layer. You can configure any layer property available on `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope` via this block. Also if the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` will be placed with a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,kotlin.Function1)` next time only the graphic layer will be moved without requiring to redrawn the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` content. |

### placeAt

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

```
protected open fun placeAt(position: IntOffset, zIndex: Float, layer: GraphicsLayer): Unit
```

Place a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` at `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,androidx.compose.ui.graphics.layer.GraphicsLayer)` in its parent's coordinate system.

| Parameters |
|---|---|
| `position: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntOffset` | position in the parent's coordinate system. |
| `zIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | controls the drawing order for the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable`. A `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` with larger `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,androidx.compose.ui.graphics.layer.GraphicsLayer)` will be drawn on top of all the children with smaller `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,androidx.compose.ui.graphics.layer.GraphicsLayer)`. When children have the same `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,androidx.compose.ui.graphics.layer.GraphicsLayer)` the order in which the items were placed is used. |
| `layer: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer` to place this placeable with. If the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` will be placed with a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,androidx.compose.ui.graphics.layer.GraphicsLayer)` next time only the graphic layer will be moved without requiring to redrawn the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` content. |

## Public properties

### height

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

```
val height: Int
```

The height, in pixels, of the measured layout, as seen by the parent. This will usually coincide with the measured height of the layout (aka the `height` value passed into `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1)`), but can be different if the layout does not respect its incoming constraints: in these cases the height will be coerced inside the min and max height constraints - to access the actual height that the layout measured itself to, use `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#measuredHeight()`.

### measuredHeight

Cmn

```
open val measuredHeight: Int
```

The measured height of the layout. This might not respect the measurement constraints.

### measuredWidth

Cmn

```
open val measuredWidth: Int
```

The measured width of the layout. This might not respect the measurement constraints.

### width

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

```
val width: Int
```

The width, in pixels, of the measured layout, as seen by the parent. This will usually coincide with the measured width of the layout (aka the `width` value passed into `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1)`), but can be different if the layout does not respect its incoming constraints: in these cases the width will be coerced inside the min and max width constraints - to access the actual width that the layout measured itself to, use `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#measuredWidth()`.

## Protected properties

### apparentToRealOffset

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

```
protected val apparentToRealOffset: IntOffset
```

The offset to be added to an apparent position assigned to this `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable` to make it real. The real layout will be centered on the space assigned by the parent, which computed the child's position only seeing its apparent size.

### measuredSize

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

```
protected var measuredSize: IntSize
```

The measured size of this Placeable. This might not respect `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#measurementConstraints()`.

### measurementConstraints

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

```
protected var measurementConstraints: Constraints
```

The constraints used for the measurement made to obtain this `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable`.