Group of parameters that represent how a drop shadow or inner shadow should be rendered.

Summary

Public constructors

Shadow(
    radius: Dp,
    brush: Brush,
    spread: Dp,
    offset: DpOffset,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float,
    blendMode: BlendMode
)

Creates a group of parameters that represent how a drop shadow or inner shadow should be rendered.

Cmn
Shadow(
    radius: Dp,
    color: Color,
    spread: Dp,
    offset: DpOffset,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float,
    blendMode: BlendMode
)

Creates a group of parameters that represent how a drop shadow or inner shadow should be rendered.

Cmn

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

Float

Opacity of the shadow

Cmn
BlendMode

Blending algorithm used by the shadow

Cmn
Brush?

Optional brush to render the shadow with.

Cmn
Color

Color of the shadow.

Cmn
DpOffset

The internal offset of the shadow within the geometry provided.

Cmn
Dp

The blur radius of the shadow

Cmn
Dp

Spread parameter that adds to the size of the shadow

Cmn

Public constructors

Shadow

Shadow(
    radius: Dp,
    brush: Brush,
    spread: Dp = 0.dp,
    offset: DpOffset = DpOffset.Zero,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    blendMode: BlendMode = DefaultBlendMode
)

Creates a group of parameters that represent how a drop shadow or inner shadow should be rendered.

Parameters
radius: Dp

The blur radius of the shadow

brush: Brush

Brush used to blend against a mask defined by the shadow geometry

spread: Dp = 0.dp

Optional parameter to grow the shadow geometry by

offset: DpOffset = DpOffset.Zero

Optional parameter to offset the shadow within the geometry bounds

alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f

Optional opacity of the shadow

blendMode: BlendMode = DefaultBlendMode

Optional blending algorithm used by the shadow

Shadow

Shadow(
    radius: Dp,
    color: Color = Color.Black,
    spread: Dp = 0.dp,
    offset: DpOffset = DpOffset.Zero,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    blendMode: BlendMode = DefaultBlendMode
)

Creates a group of parameters that represent how a drop shadow or inner shadow should be rendered.

Parameters
radius: Dp

The blur radius of the shadow

color: Color = Color.Black

The color of the shadow. If Color.Unspecified is provided, Color.Black will be used as a default.

spread: Dp = 0.dp

Optional parameter to grow the shadow geometry by

offset: DpOffset = DpOffset.Zero

Optional parameter to offset the shadow within the geometry bounds

alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f

Optional opacity of the shadow

blendMode: BlendMode = DefaultBlendMode

Optional blending algorithm used by the shadow

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

alpha

val alphaFloat

Opacity of the shadow

blendMode

val blendModeBlendMode

Blending algorithm used by the shadow

brush

val brushBrush?

Optional brush to render the shadow with.

color

val colorColor

Color of the shadow. If Color.Unspecified is provided, Color.Black will be used as a default. This color is only used if brush is null.

offset

val offsetDpOffset

The internal offset of the shadow within the geometry provided.

radius

val radiusDp

The blur radius of the shadow

spread

val spreadDp

Spread parameter that adds to the size of the shadow