# InnerShadowPainter

Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/shadow/InnerShadowPainter.kt+class:androidx.compose.ui.graphics.shadow.InnerShadowPainter) Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0) Common/AllAndroid/JVM
- Cmn

  ```
  class InnerShadowPainter : Painter
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.compose.ui.graphics.painter.Painter](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter) ||
|   | ↳ | [androidx.compose.ui.graphics.shadow.InnerShadowPainter](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter) |

*** ** * ** ***

`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter` implementation that draws an inner shadow with the geometry defined by the specified shape and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow`.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter#InnerShadowPainter(androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.shadow.Shadow)(shape: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape, shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow)` Create an `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter` with the specified `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter#(androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.shadow.Shadow)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter#(androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.shadow.Shadow)`. | Cmn |

| ### Protected functions |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter#applyAlpha(kotlin.Float)(alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Apply the provided alpha value returning true if it was applied successfully, or false if it could not be applied | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter#applyColorFilter(androidx.compose.ui.graphics.ColorFilter)(colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?)` Apply the provided color filter returning true if it was applied successfully, or false if it could not be applied | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter#applyLayoutDirection(androidx.compose.ui.unit.LayoutDirection)(layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection)` Apply the appropriate internal configuration to positioning content with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter#(androidx.compose.ui.graphics.drawscope.DrawScope).onDraw()()` Implementation of drawing logic for instances of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter`. | Cmn |

| ### Public properties |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter#intrinsicSize()` Return the intrinsic size of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter`. | Cmn |

### Inherited functions

From [androidx.compose.ui.graphics.painter.Painter](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter#(androidx.compose.ui.graphics.drawscope.DrawScope).draw(androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.ColorFilter)(size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?)` Cmn

## Public constructors

### InnerShadowPainter

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

```
InnerShadowPainter(shape: Shape, shadow: Shadow)
```

Create an `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter` with the specified `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter#(androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.shadow.Shadow)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter#(androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.shadow.Shadow)`. It is preferred to obtain an instance of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter` through a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/ShadowContext` instance instead, as the underlying shadow dependencies can be shared across multiple `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter` instances. However, creating an instance through this constructor will not share resources with any other `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/InnerShadowPainter`.

| Parameters |
|---|---|
| `shape: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` | Shape of the shadow |
| `shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow` | Parameters used to render the shadow |

## Protected functions

### applyAlpha

Cmn

```
protected open fun applyAlpha(alpha: Float): Boolean
```

Apply the provided alpha value returning true if it was applied successfully, or false if it could not be applied

### applyColorFilter

Cmn

```
protected open fun applyColorFilter(colorFilter: ColorFilter?): Boolean
```

Apply the provided color filter returning true if it was applied successfully, or false if it could not be applied

### applyLayoutDirection

Cmn

```
protected open fun applyLayoutDirection(layoutDirection: LayoutDirection): Boolean
```

Apply the appropriate internal configuration to positioning content with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection`

### DrawScope.onDraw

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/shadow/InnerShadowPainter.kt+function:onDraw)

```
protected open fun DrawScope.onDraw(): Unit
```

Implementation of drawing logic for instances of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter`. This is invoked internally within `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter#(androidx.compose.ui.graphics.drawscope.DrawScope).draw(androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.ColorFilter)` after the positioning and configuring the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter`

## Public properties

### intrinsicSize

Cmn

```
open val intrinsicSize: Size
```

Return the intrinsic size of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter`. If the there is no intrinsic size (i.e. filling bounds with an arbitrary color) return `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size#Unspecified()`. If there is no intrinsic size in a single dimension, return `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` with `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/-companion/-na-n.html` in the desired dimension. If a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter` does not have an intrinsic size, it will always draw within the full bounds of the destination