androidx.compose.ui.draw

ShadowScopeSince 1.9

Interface · from org.jetbrains.compose.ui:ui:1.12.2

No hand-written docs yet.

Scope that can be used to define properties to render either a drop shadow or inner shadow. This includes the radius, spread, color, brush, alpha, blendMode, and offset parameters.

interface ShadowScope : Density

Is a

Properties

radius

val radius: Float

Blur radius of the shadow, in pixels. Defaults to 0.

spread

val spread: Float

Spread parameter that adds to the size of the shadow, in pixels. Defaults to 0.

color

val color: Color

Color of the shadow, Defaults to Color.Black. Attempts to provide Color.Unspecified will fallback to rendering with Color.Black. This parameter is consumed if brush is null.

brush

val brush: Brush?

The brush to use for the shadow. If null, the color parameter is consumed instead

alpha

val alpha: Float

Opacity of the shadow. Defaults to 1f indicating a fully opaque shadow

blendMode

val blendMode: BlendMode

Blending algorithm used by the shadow. Defaults to BlendMode.SrcOver

offset

val offset: Offset

Offset of the shadow. Defaults to Offset.Zero.

Library docs

Scope that can be used to define properties to render either a drop shadow or inner shadow. This includes the radius, spread, color, brush, alpha, blendMode, and offset parameters.