# ApproachMeasureScope

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

  ```
  sealed interface ApproachMeasureScope : ApproachIntrinsicMeasureScope, MeasureScope
  ```

*** ** * ** ***

`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/ui/layout/ApproachIntrinsicMeasureScope#lookaheadSize()` provides the target size of the layout. By knowing the target size and position, layout adjustments such as animations can be defined in `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ApproachLayoutModifierNode` to morph the layout gradually in both size and position to arrive at its precalculated bounds.

## Summary

| ### 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 | |
| From [androidx.compose.ui.layout.MeasureScope](https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/MeasureScope) |---|---|---| | `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 properties |
|---|
| From [androidx.compose.ui.layout.ApproachIntrinsicMeasureScope](https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ApproachIntrinsicMeasureScope) |---|---|---| | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Constraints` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ApproachIntrinsicMeasureScope#lookaheadConstraints()` Constraints used to measure the layout in the lookahead pass. | Cmn | | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ApproachIntrinsicMeasureScope#lookaheadSize()` Size of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ApproachLayoutModifierNode` measured during the lookahead pass using `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ApproachIntrinsicMeasureScope#lookaheadConstraints()`. | Cmn | |
| 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 | |