# ShapeScope

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.ShapeScope) Added in [1.12.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.12.0) Common/All
- Cmn

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

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/DrawStyleScope` | An interface that introduces the drawing 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/ShapeScope#shape(androidx.compose.ui.graphics.Shape)` property 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/ShapeScope#shape(androidx.compose.ui.graphics.Shape)(value: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)` Sets the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` for the component. | Cmn |

## Public functions

### shape

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

```
fun shape(value: Shape): Unit
```

Sets the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` for the component. This shape is used for clipping (`https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ClipScope#clip(kotlin.Boolean)`), background rendering (`https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/BackgroundScope#background(androidx.compose.ui.graphics.Color)`), and border rendering.

If `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ShapeScope#shape(androidx.compose.ui.graphics.Shape)` is not specified then a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#RectangleShape()` is used.

This property is *not* inherited

| Parameters |
|---|---|
| `value: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` | The shape to apply. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/ClipScope#clip(kotlin.Boolean)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/BackgroundScope#background(androidx.compose.ui.graphics.Color)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/package-summary#(androidx.compose.foundation.style.BorderScope).border(androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/draw/clip.modifier#(androidx.compose.ui.Modifier).clip(androidx.compose.ui.graphics.Shape)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/background.modifier#(androidx.compose.ui.Modifier).background(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shape)` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/border.modifier#(androidx.compose.ui.Modifier).border(androidx.compose.foundation.BorderStroke,androidx.compose.ui.graphics.Shape)` |   |