# GraphicsLayerScope

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

  ```
  @PlacementScopeMarker
  interface GraphicsLayerScope : Density
  ```

*** ** * ** ***

A scope which can be used to define the effects to apply for the content, such as scaling (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#scaleX()`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#scaleY()`), rotation (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#rotationX()`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#rotationY()`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#rotationZ()`), opacity (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#alpha()`), shadow (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shadowElevation()`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shape()`), and clipping (`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#clip()`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shape()`).

## Summary

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#alpha()` The alpha of the drawn area. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#ambientShadowColor()` Sets the color of the ambient shadow that is drawn when `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shadowElevation()`\> 0f. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#blendMode()` BlendMode to use when drawing this layer to the destination. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#cameraDistance()` Sets the distance along the Z axis (orthogonal to the X/Y plane on which layers are drawn) from the camera to this layer. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#clip()` Set to `true` to clip the content to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shape()`. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#colorFilter()` ColorFilter applied when drawing this layer to the destination. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/CompositingStrategy` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#compositingStrategy()` Determines the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/CompositingStrategy` used to render the contents of this graphicsLayer into an offscreen buffer first before rendering to the destination | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/LayerOutsets` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#outsets()` Adds to the size of the layer increasing its bounds. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/RenderEffect?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#renderEffect()` Configure the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/RenderEffect` to apply to this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#rotationX()` The rotation, in degrees, of the contents around the horizontal axis in degrees. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#rotationY()` The rotation, in degrees, of the contents around the vertical axis in degrees. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#rotationZ()` The rotation, in degrees, of the contents around the Z axis in degrees. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#scaleX()` The horizontal scale of the drawn area. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#scaleY()` The vertical scale of the drawn area. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shadowElevation()` Sets the elevation for the shadow in pixels. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shape()` The `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` of the layer. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#size()` `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` of the graphicsLayer represented in pixels. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#spotShadowColor()` Sets the color of the spot shadow that is drawn when `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shadowElevation()`\> 0f. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/TransformOrigin` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#transformOrigin()` Offset percentage along the x and y axis for which contents are rotated and scaled. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#translationX()` Horizontal pixel offset of the layer relative to its left bound. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#translationY()` Vertical pixel offset of the layer relative to its top bound. | 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

## Public properties

### alpha

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

```
var alpha: Float
```

The alpha of the drawn area. Setting this to something other than `1` will cause the drawn contents to be translucent and setting it to `0` will cause it to be fully invisible. Default value is `1` and the range is between `0` and `1`.

### ambientShadowColor

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

```
open var ambientShadowColor: Color
```

Sets the color of the ambient shadow that is drawn when `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shadowElevation()`\> 0f.

By default the shadow color is black. Generally, this color will be opaque so the intensity of the shadow is consistent between different graphics layers with different colors.

The opacity of the final ambient shadow is a function of the shadow caster height, the alpha channel of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#ambientShadowColor()` (typically opaque), and the android.R.attr.ambientShadowAlpha theme attribute.

Note that this parameter is only supported on Android 9 (Pie) and above. On older versions, this property always returns `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Black()` and setting new values is ignored.

### blendMode

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

```
open var blendMode: BlendMode
```

BlendMode to use when drawing this layer to the destination. The default is `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode#SrcOver()`. Any value other than `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode#SrcOver()` will force this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope` to use an offscreen compositing layer for rendering and is equivalent to using `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/CompositingStrategy#Offscreen()`.

### cameraDistance

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

```
var cameraDistance: Float
```

Sets the distance along the Z axis (orthogonal to the X/Y plane on which layers are drawn) from the camera to this layer. The camera's distance affects 3D transformations, for instance rotations around the X and Y axis. If the rotationX or rotationY properties are changed and this view is large (more than half the size of the screen), it is recommended to always use a camera distance that's greater than the height (X axis rotation) or the width (Y axis rotation) of this view.

The distance of the camera from the drawing plane can have an affect on the perspective distortion of the layer when it is rotated around the x or y axis. For example, a large distance will result in a large viewing angle, and there will not be much perspective distortion of the view as it rotates. A short distance may cause much more perspective distortion upon rotation, and can also result in some drawing artifacts if the rotated view ends up partially behind the camera (which is why the recommendation is to use a distance at least as far as the size of the view, if the view is to be rotated.)

The distance is expressed in pixels and must always be positive. Default value is `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#DefaultCameraDistance()`

### clip

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

```
var clip: Boolean
```

Set to `true` to clip the content to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shape()`. Default value is `false`

### colorFilter

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

```
open var colorFilter: ColorFilter?
```

ColorFilter applied when drawing this layer to the destination. Setting of this to any non-null will force this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer` to use an offscreen compositing layer for rendering and is equivalent to using `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/CompositingStrategy#Offscreen()`

### compositingStrategy

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

```
open var compositingStrategy: CompositingStrategy
```

Determines the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/CompositingStrategy` used to render the contents of this graphicsLayer into an offscreen buffer first before rendering to the destination

### outsets

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

```
open var outsets: LayerOutsets
```

Adds to the size of the layer increasing its bounds. This can be used to prevent content that renders outside the layer's size (such as shadows) from being clipped if the graphicsLayer is promoted to an offscreen rasterization layer. The clip and shadow will still be based on the original size of the layer.

### renderEffect

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

```
open var renderEffect: RenderEffect?
```

Configure the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/RenderEffect` to apply to this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope`. This will apply a visual effect to the results of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope` before it is drawn. For example if `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlurEffect` is provided, the contents will be drawn in a separate layer, then this layer will be blurred when this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope` is drawn.

Note this parameter is only supported on Android 12 and above. Attempts to use this Modifier on older Android versions will be ignored.

### rotationX

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

```
var rotationX: Float
```

The rotation, in degrees, of the contents around the horizontal axis in degrees. Default value is `0`.

### rotationY

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

```
var rotationY: Float
```

The rotation, in degrees, of the contents around the vertical axis in degrees. Default value is `0`.

### rotationZ

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

```
var rotationZ: Float
```

The rotation, in degrees, of the contents around the Z axis in degrees. Default value is `0`.

### scaleX

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

```
var scaleX: Float
```

The horizontal scale of the drawn area. Default value is `1`.

### scaleY

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

```
var scaleY: Float
```

The vertical scale of the drawn area. Default value is `1`.

### shadowElevation

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

```
var shadowElevation: Float
```

Sets the elevation for the shadow in pixels. With the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shadowElevation()`\> 0f and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shape()` set, a shadow is produced. Default value is `0` and the value must not be negative.

Note that if you provide a non-zero `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shadowElevation()` and if the passed `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shape()` is concave the shadow will not be drawn on Android versions less than 10.

### shape

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

```
var shape: Shape
```

The `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` of the layer. When `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shadowElevation()` is non-zero a shadow is produced using this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shape()`. When `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#clip()` is `true` contents will be clipped to this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shape()`. When clipping, the content will be redrawn when the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shape()` changes. Default value is `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#RectangleShape()`

### size

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

```
open val size: Size
```

`https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` of the graphicsLayer represented in pixels. Drawing commands can extend beyond the size specified, however, if the graphicsLayer is promoted to an offscreen rasterization layer, any content rendered outside of the specified size will be clipped.

### spotShadowColor

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

```
open var spotShadowColor: Color
```

Sets the color of the spot shadow that is drawn when `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#shadowElevation()`\> 0f.

By default the shadow color is black. Generally, this color will be opaque so the intensity of the shadow is consistent between different graphics layers with different colors.

The opacity of the final spot shadow is a function of the shadow caster height, the alpha channel of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope#spotShadowColor()` (typically opaque), and the android.R.attr.spotShadowAlpha theme attribute.

Note that this parameter is only supported on Android 9 (Pie) and above. On older versions, this property always returns `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Black()` and setting new values is ignored.

### transformOrigin

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

```
var transformOrigin: TransformOrigin
```

Offset percentage along the x and y axis for which contents are rotated and scaled. The default value of 0.5f, 0.5f indicates the pivot point will be at the midpoint of the left and right as well as the top and bottom bounds of the layer. Default value is `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/TransformOrigin#Center()`

### translationX

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

```
var translationX: Float
```

Horizontal pixel offset of the layer relative to its left bound. Default value is `0`.

### translationY

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

```
var translationY: Float
```

Vertical pixel offset of the layer relative to its top bound. Default value is `0`