ComponentShadow

data class ComponentShadow(var radius: Float = 0.0f, var dx: Float = 0.0f, var dy: Float = 0.0f, var color: Int = 0, var applyElevationOverlay: Boolean = false)

A class that stores shadow properties.

Constructors

Link copied to clipboard
constructor(radius: Float = 0.0f, dx: Float = 0.0f, dy: Float = 0.0f, color: Int = 0, applyElevationOverlay: Boolean = false)

Properties

Link copied to clipboard

whether to apply an elevation overlay to the component casting the shadow.

Link copied to clipboard
var color: Int

the shadow color.

Link copied to clipboard
var dx: Float

the horizontal offset.

Link copied to clipboard
var dy: Float

the vertical offset.

Link copied to clipboard

the blur radius.

Functions

Link copied to clipboard
fun maybeUpdateShadowLayer(context: DrawContext, paint: Paint, backgroundColor: Int)

Checks whether the applied shadow layer needs to be updated.