---
title: "DropShadowPainter"
description: "[Painter] implementation that draws a drop shadow with the geometry defined by the specified
shape and [Shadow]."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
class DropShadowPainter
internal constructor(
    private val shape: Shape,
    private val shadow: Shadow,
    private val renderCreator: DropShadowRendererProvider,
) : Painter()
```


`Painter` implementation that draws a drop shadow with the geometry defined by the specified
shape and `Shadow`.


## Secondary Constructors

```kotlin
constructor(
    shape: Shape,
    shadow: Shadow,
) : this(shape, shadow, DropShadowRendererProvider.Default)
```


Create a `DropShadowPainter` with the specified `shape` and `shadow`. It is preferred to
obtain an instance of the `DropShadowPainter` through a `ShadowContext` instance instead, as
the underlying shadow dependencies can be shared across multiple `DropShadowPainter`
instances. However, creating an instance through this constructor will not share resources
with any other `DropShadowPainter`.

#### Parameters

| | |
| --- | --- |
| shape | Shape of the shadow |
| shadow | Parameters used to render the shadow |




