DropShadowPainter

Class

Common
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

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

shapeShape of the shadow
shadowParameters used to render the shadow