# MeasureScope

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

  ```
  @MeasureScopeMarker
  interface MeasureScope : IntrinsicMeasureScope
  ```
Known direct subclasses [ApproachMeasureScope](https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ApproachMeasureScope), [LazyLayoutMeasureScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/layout/LazyLayoutMeasureScope), [SubcomposeMeasureScope](https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/SubcomposeMeasureScope)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ApproachMeasureScope` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ApproachMeasureScope` provides access to lookahead results to allow `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ApproachLayoutModifierNode` to leverage lookahead results to define how measurements and placements approach their destination. |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/layout/LazyLayoutMeasureScope` | The receiver scope of a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/layout/LazyLayout.composable#LazyLayout(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.foundation.lazy.layout.LazyLayoutPrefetchState,androidx.compose.foundation.lazy.layout.LazyLayoutMeasurePolicy)`'s measure lambda. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/SubcomposeMeasureScope` | The receiver scope of a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/SubcomposeLayout.composable#SubcomposeLayout(androidx.compose.ui.Modifier,kotlin.Function2)`'s measure lambda which adds ability to dynamically subcompose a content during the measuring on top of the features provided by `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope`. |

*** ** * ** ***

The receiver scope of a layout's measure lambda. The return value of the measure lambda is `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureResult`, which should be returned by `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1)`

## Summary

| ### Public functions |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureResult` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1)( width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, alignmentLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/AlignmentLine, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>, placementBlock: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable.PlacementScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Sets the size and alignment lines of the measured layout, as well as the positioning block that defines the children positioning logic. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureResult` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,kotlin.Function1)( width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, alignmentLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/AlignmentLine, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>, rulers: (https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/RulerScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?, placementBlock: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable.PlacementScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Sets the size and alignment lines of the measured layout, as well as the positioning block that defines the children positioning logic. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureResult` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.Function1,kotlin.Function2,kotlin.collections.Map,kotlin.Function1)( width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, isRulerProvided: (https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Ruler) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, rulerProvider: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/RulerScope.(https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Ruler) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, alignmentLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/AlignmentLine, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>, placementBlock: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable.PlacementScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Sets the size and alignment lines of the measured layout, as well as the positioning block that defines the children positioning logic. | Cmn |

### Inherited functions

From [androidx.compose.ui.unit.Density](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.Dp).roundToPx()()`

Convert `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` to `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` by rounding
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.TextUnit).roundToPx()()`

Convert Sp to `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` by rounding
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Int).toDp()()`

Convert an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` pixel value to `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp`.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Float).toDp()()`

Convert a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` pixel value to a Dp
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize` `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.geometry.Size).toDpSize()()`

Convert a `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` to a `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize`.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.Dp).toPx()()`

Convert `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` to pixels.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.TextUnit).toPx()()`

Convert Sp to pixels.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpRect.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.DpRect).toRect()()`

Convert a `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpRect` to a `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect`.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.DpSize).toSize()()`

Convert a `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize` to a `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size`.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Int).toSp()()`

Convert an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` pixel value to Sp.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Float).toSp()()`

Convert a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` pixel value to a Sp
Cmn From [androidx.compose.ui.unit.FontScaling](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling) `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling#(androidx.compose.ui.unit.TextUnit).toDp()()`

Convert Sp to `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp`.
Cmn `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling#(androidx.compose.ui.unit.Dp).toSp()()`

Convert `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` to Sp.
Cmn

### Inherited properties

From [androidx.compose.ui.unit.Density](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#density()`

The logical density of the display.
Cmn From [androidx.compose.ui.unit.FontScaling](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling#fontScale()`

Current user preference for the scaling factor for fonts.
Cmn From [androidx.compose.ui.layout.IntrinsicMeasureScope](https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/IntrinsicMeasureScope) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/IntrinsicMeasureScope#isLookingAhead()`

This indicates whether the ongoing measurement is for lookahead pass.
Cmn `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/IntrinsicMeasureScope#layoutDirection()`

The `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` of the `Layout` or `LayoutModifier` using the measure scope to measure their children.
Cmn

## Public functions

### layout

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

```
open fun layout(
    width: Int,
    height: Int,
    alignmentLines: Map<AlignmentLine, Int> = emptyMap(),
    placementBlock: Placeable.PlacementScope.() -> Unit
): MeasureResult
```

Sets the size and alignment lines of the measured layout, as well as the positioning block that defines the children positioning logic. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1)` is a lambda used for positioning children. `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,kotlin.Function1)` should be called on children inside placementBlock. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1)` can be used by the parent layouts to decide layout, and can be queried using the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Measured#get(androidx.compose.ui.layout.AlignmentLine)` operator. Note that alignment lines will be inherited by parent layouts, such that indirect parents will be able to query them as well.

| Parameters |
|---|---|
| `width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the measured width of the layout |
| `height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the measured height of the layout |
| `alignmentLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/AlignmentLine, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html> = emptyMap()` | the alignment lines defined by the layout |
| `placementBlock: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable.PlacementScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | block defining the children positioning of the current layout |

### layout

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

```
open fun layout(
    width: Int,
    height: Int,
    alignmentLines: Map<AlignmentLine, Int> = emptyMap(),
    rulers: (RulerScope.() -> Unit)? = null,
    placementBlock: Placeable.PlacementScope.() -> Unit
): MeasureResult
```

Sets the size and alignment lines of the measured layout, as well as the positioning block that defines the children positioning logic. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,kotlin.Function1)` is a lambda used for positioning children. `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,kotlin.Function1)` should be called on children inside placementBlock. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,kotlin.Function1)` can be used by the parent layouts to decide layout, and can be queried using the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Measured#get(androidx.compose.ui.layout.AlignmentLine)` operator. Note that alignment lines will be inherited by parent layouts, such that indirect parents will be able to query them as well.

| Parameters |
|---|---|
| `width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the measured width of the layout |
| `height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the measured height of the layout |
| `alignmentLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/AlignmentLine, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html> = emptyMap()` | the alignment lines defined by the layout |
| `rulers: (https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/RulerScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)? = null` | a method to set Ruler values used by all placed children |
| `placementBlock: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable.PlacementScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | block defining the children positioning of the current layout |

### layout

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

```
open fun layout(
    width: Int,
    height: Int,
    isRulerProvided: (Ruler) -> Boolean,
    rulerProvider: RulerScope.(Ruler) -> Unit,
    alignmentLines: Map<AlignmentLine, Int> = emptyMap(),
    placementBlock: Placeable.PlacementScope.() -> Unit
): MeasureResult
```

Sets the size and alignment lines of the measured layout, as well as the positioning block that defines the children positioning logic. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.Function1,kotlin.Function2,kotlin.collections.Map,kotlin.Function1)` is a lambda used for positioning children. `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,kotlin.Function1)` should be called on children inside placementBlock. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.Function1,kotlin.Function2,kotlin.collections.Map,kotlin.Function1)` can be used by the parent layouts to decide layout, and can be queried using the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Measured#get(androidx.compose.ui.layout.AlignmentLine)` operator. Note that alignment lines will be inherited by parent layouts, such that indirect parents will be able to query them as well.

Use this version when providing the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Ruler`s is expensive and should only be done when needed.

```kotlin
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.HorizontalRuler
import androidx.compose.ui.layout.Measurable
import androidx.compose.ui.layout.MeasureResult
import androidx.compose.ui.layout.MeasureScope
import androidx.compose.ui.layout.VerticalRuler
import androidx.compose.ui.layout.layout
import androidx.compose.ui.layout.positionOnScreen
import androidx.compose.ui.node.CompositionLocalConsumerModifierNode
import androidx.compose.ui.node.LayoutModifierNode
import androidx.compose.ui.node.currentValueOf
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.Constraints

// Position of the left side of the screen
val ScreenLeftRuler = VerticalRuler()
// Position of the top of the screen
val ScreenTopRuler = HorizontalRuler()
// Position of the right side of the screen
val ScreenRightRuler = VerticalRuler()
// Position of the bottom of the screen
val ScreenBottomRuler = HorizontalRuler()

class ScreenRulerNode :
    Modifier.Node(), LayoutModifierNode, CompositionLocalConsumerModifierNode {
    override fun MeasureScope.measure(
        measurable: Measurable,
        constraints: Constraints,
    ): MeasureResult {
        val placeable = measurable.measure(constraints)
        return layout(
            placeable.width,
            placeable.height,
            isRulerProvided = { ruler ->
                ruler === ScreenLeftRuler ||
                    ruler === ScreenTopRuler ||
                    ruler === ScreenRightRuler ||
                    ruler === ScreenBottomRuler
            },
            rulerProvider = {
                // Because these rulers are updated when the View or Window moves, this may be
                // expensive if the ComposeView is in a RecyclerView, for example. If no
                // content has requested a screen position ruler, this won't be called and
                // the calculation can be avoided.
                val positionOnScreen = coordinates.positionOnScreen()

                // Once we've calculated the position on screen, we may as well provide
                // all values since it doesn't cost much to provide everything. The developer
                // is likely to request multiple values if they request one.
                ScreenLeftRuler provides -positionOnScreen.x
                ScreenTopRuler provides -positionOnScreen.y

                // We have to find the screen size from the DisplayMetrics
                val displayMetrics = currentValueOf(LocalContext).resources.displayMetrics
                val screenHeight = displayMetrics.heightPixels
                val screenWidth = displayMetrics.widthPixels
                ScreenRightRuler provides screenWidth - positionOnScreen.x
                ScreenBottomRuler provides screenHeight - positionOnScreen.y
            },
        ) {
            placeable.place(0, 0)
        }
    }
}
```

| Parameters |
|---|---|
| `width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the measured width of the layout |
| `height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the measured height of the layout |
| `isRulerProvided: (https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Ruler) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Works in conjunction with `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.Function1,kotlin.Function2,kotlin.collections.Map,kotlin.Function1)` to `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/RulerScope#(androidx.compose.ui.layout.Ruler).provides(kotlin.Float)` Ruler values individually. A return value of `true` indicates that `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.Function1,kotlin.Function2,kotlin.collections.Map,kotlin.Function1)` might be able to provide a value for the passed-in `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Ruler`. A value of `false` means it can never provide the value. |
| `rulerProvider: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/RulerScope.(https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Ruler) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | A lambda that can `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/RulerScope#(androidx.compose.ui.layout.Ruler).provides(kotlin.Float)` `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Ruler` values. When `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.Function1,kotlin.Function2,kotlin.collections.Map,kotlin.Function1)` returns `true` for a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Ruler`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.Function1,kotlin.Function2,kotlin.collections.Map,kotlin.Function1)` will be called to provide its value. `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope#layout(kotlin.Int,kotlin.Int,kotlin.Function1,kotlin.Function2,kotlin.collections.Map,kotlin.Function1)` can choose not to provide the value if it isn't available. It can also provide more `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Ruler` values if it is convenient to provide them. For example, it may be convenient to provide all values for a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/RectRulers` when one is provided. |
| `alignmentLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/AlignmentLine, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html> = emptyMap()` | the alignment lines defined by the layout |
| `placementBlock: https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable.PlacementScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | block defining the children positioning of the current layout |