ShadowScope

Interface

Common
@JvmDefaultWithCompatibility
interface ShadowScope : Density

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.

Properties

Common
var radius: Float

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

Common
var spread: Float

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

Common
var 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.

Common
var brush: Brush?

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

Common
var alpha: Float

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

Common
var blendMode: BlendMode

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

Common
var offset: Offset

Offset of the shadow. Defaults to Offset.Zero.