# ScaleScope

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/style/StyleScope.kt+class:androidx.compose.foundation.style.ScaleScope) Added in [1.12.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.12.0) Common/All
- Cmn

  ```
  @ExperimentalFoundationStyleApi
  interface ScaleScope
  ```
Known direct subclasses [LayerStyleScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/LayerStyleScope)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/LayerStyleScope` | An interface that introduces the graphics layer property to a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Style` receiver scope. |

Known indirect subclasses [StyleScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope` | A `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope` is the receiver scope of a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Style` lambda. |

*** ** * ** ***

An interface that introduces the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleX(kotlin.Float)` and `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleY(kotlin.Float)` properties to a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/Style` receiver scope.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/StyleScope` |   |

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleX(kotlin.Float)(value: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Scales the component horizontally around its center pivot point. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleY(kotlin.Float)(value: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Scales the component vertically around its center pivot point. | Cmn |

| ### Extension functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ExperimentalFoundationStyleApi https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope.https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#(androidx.compose.foundation.style.ScaleScope).scale(kotlin.Float)(value: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Scales the component uniformly (both horizontally and vertically) around its center pivot point. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ExperimentalFoundationStyleApi https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope.https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#(androidx.compose.foundation.style.ScaleScope).scale(kotlin.Float,kotlin.Float)( x: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Scales the component uniformly (both horizontally and vertically) around its center pivot point. | Cmn |

## Public functions

### scaleX

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

```
fun scaleX(value: @FloatRange(from = 0.0) Float): Unit
```

Scales the component horizontally around its center pivot point.

Setting scaleX will override the horizontal scaling set by a previous call to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/package-summary#(androidx.compose.foundation.style.ScaleScope).scale(kotlin.Float)`.

This property is *not* inherited

| Parameters |
|---|---|
| `value: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The scaling factor for the X-axis. 1.0f is no scale. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleY(kotlin.Float)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/package-summary#(androidx.compose.foundation.style.ScaleScope).scale(kotlin.Float)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/draw/scale.modifier#(androidx.compose.ui.Modifier).scale(kotlin.Float,kotlin.Float)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/graphicsLayer.modifier#(androidx.compose.ui.Modifier).graphicsLayer(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.compose.ui.graphics.TransformOrigin,androidx.compose.ui.graphics.Shape,kotlin.Boolean,androidx.compose.ui.graphics.RenderEffect,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.CompositingStrategy,androidx.compose.ui.graphics.BlendMode,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.LayerOutsets)` |   |

### scaleY

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

```
fun scaleY(value: @FloatRange(from = 0.0) Float): Unit
```

Scales the component vertically around its center pivot point.

Setting scaleX will override the vertical scaling set by a previous call to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/package-summary#(androidx.compose.foundation.style.ScaleScope).scale(kotlin.Float)`.

This property is *not* inherited

| Parameters |
|---|---|
| `value: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The scaling factor for the Y-axis. 1.0f is no scale. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleX(kotlin.Float)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/package-summary#(androidx.compose.foundation.style.ScaleScope).scale(kotlin.Float)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/draw/scale.modifier#(androidx.compose.ui.Modifier).scale(kotlin.Float,kotlin.Float)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/graphicsLayer.modifier#(androidx.compose.ui.Modifier).graphicsLayer(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.compose.ui.graphics.TransformOrigin,androidx.compose.ui.graphics.Shape,kotlin.Boolean,androidx.compose.ui.graphics.RenderEffect,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.CompositingStrategy,androidx.compose.ui.graphics.BlendMode,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.LayerOutsets)` |   |

## Extension functions

### ScaleScope.scale

Cmn Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/style/StyleScope.kt+function:scale)

```
@ExperimentalFoundationStyleApi
fun ScaleScope.scale(value: @FloatRange(from = 0.0) Float): Unit
```

Scales the component uniformly (both horizontally and vertically) around its center pivot point.

Setting `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/package-summary#(androidx.compose.foundation.style.ScaleScope).scale(kotlin.Float)` will override the horizontal scaling set by a previous call to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleX(kotlin.Float)` and the previous vertical scaling set by calling `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleY(kotlin.Float)`.

This property is *not* inherited

| Parameters |
|---|---|
| `value: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The scaling factor for both X and Y axes. 1.0f is no scale. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleX(kotlin.Float)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleY(kotlin.Float)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/draw/scale.modifier#(androidx.compose.ui.Modifier).scale(kotlin.Float,kotlin.Float)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/graphicsLayer.modifier#(androidx.compose.ui.Modifier).graphicsLayer(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.compose.ui.graphics.TransformOrigin,androidx.compose.ui.graphics.Shape,kotlin.Boolean,androidx.compose.ui.graphics.RenderEffect,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.CompositingStrategy,androidx.compose.ui.graphics.BlendMode,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.LayerOutsets)` |   |

### ScaleScope.scale

Cmn Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/style/StyleScope.kt+function:scale)

```
@ExperimentalFoundationStyleApi
fun ScaleScope.scale(
    x: @FloatRange(from = 0.0) Float,
    y: @FloatRange(from = 0.0) Float
): Unit
```

Scales the component uniformly (both horizontally and vertically) around its center pivot point.

Setting `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/package-summary#(androidx.compose.foundation.style.ScaleScope).scale(kotlin.Float,kotlin.Float)` will override the horizontal scaling set by a previous call to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleX(kotlin.Float)` and the previous vertical scaling set by calling `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleY(kotlin.Float)`.

This property is *not* inherited

| Parameters |
|---|---|
| `x: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The scaling factor for X axes. 1.0f is no scale. |
| `y: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The scaling factor for Y axes. 1.0f is no scale. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleX(kotlin.Float)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ScaleScope#scaleY(kotlin.Float)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/draw/scale.modifier#(androidx.compose.ui.Modifier).scale(kotlin.Float,kotlin.Float)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/graphicsLayer.modifier#(androidx.compose.ui.Modifier).graphicsLayer(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.compose.ui.graphics.TransformOrigin,androidx.compose.ui.graphics.Shape,kotlin.Boolean,androidx.compose.ui.graphics.RenderEffect,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.CompositingStrategy,androidx.compose.ui.graphics.BlendMode,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.LayerOutsets)` |   |