# androidx.compose.ui.graphics.shadow

Common/AllAndroid/JVM

## Interfaces

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/ShadowContext` | Class responsible for managing shadow related dependencies. | Cmn |

## Classes

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/DropShadowPainter` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter` implementation that draws a drop shadow with the geometry defined by the specified shape and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow`. | Cmn |
| `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`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow` | Group of parameters that represent how a drop shadow or inner shadow should be rendered. | Cmn |

## Top-level functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/ShadowContext` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/package-summary#ShadowContext()()` Create a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/package-summary#ShadowContext()` | android |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/package-summary#lerp(androidx.compose.ui.graphics.shadow.Shadow,androidx.compose.ui.graphics.shadow.Shadow,kotlin.Float)(a: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow?, b: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow?, t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Linearly interpolate between two `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow`s. | Cmn |

## Top-level functions

### ShadowContext

android 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/AndroidShadowContext.android.kt+function:ShadowContext)

```
fun ShadowContext(): ShadowContext
```

Create a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/package-summary#ShadowContext()`

### lerp

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/Shadow.kt+function:lerp) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun lerp(a: Shadow?, b: Shadow?, t: Float): Shadow?
```

Linearly interpolate between two `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow`s.

The `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/package-summary#lerp(androidx.compose.ui.graphics.shadow.Shadow,androidx.compose.ui.graphics.shadow.Shadow,kotlin.Float)` argument represents position on the timeline, with 0.0 meaning that the interpolation has not started, returning `a` (or something equivalent to `a`), 1.0 meaning that the interpolation has finished, returning `b` (or something equivalent to `b`), and values in between meaning that the interpolation is at the relevant point on the timeline between `a` and `b`.

The interpolation can be extrapolated beyond 0.0 and 1.0, so negative values and values greater than 1.0 are valid (and can easily be generated by curves).

If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/package-summary#lerp(androidx.compose.ui.graphics.shadow.Shadow,androidx.compose.ui.graphics.shadow.Shadow,kotlin.Float)` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/package-summary#lerp(androidx.compose.ui.graphics.shadow.Shadow,androidx.compose.ui.graphics.shadow.Shadow,kotlin.Float)` are both null, this will return `null`. If only one of the arguments is null, the null argument will be replaced with a transparent copy of the non-null argument

| Parameters |
|---|---|
| `a: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow?` | Start `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow` at t = 0f |
| `b: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow?` | End `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow` at t = 1f |
| `t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Position on the timeline |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow?` | Interpolated `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/shadow/Shadow` |