Source set: Common
public class Shadow(
@Stable public val color: Color = Color(0xFF000000),
@Stable public val offset: Offset = Offset.Zero,
@Stable public val blurRadius: Float = 0.0f,
)
A single shadow.
Functions
equals
Source set: Common
override fun equals(other: Any?): Boolean
hashCode
Source set: Common
override fun hashCode(): Int
toString
Source set: Common
override fun toString(): String
copy
Source set: Common
public fun copy(
color: Color = this.color,
offset: Offset = this.offset,
blurRadius: Float = this.blurRadius,
): Shadow
Members
Companion
Source set: Common
public companion object
Properties
None
Source set: Common
@Stable public val None: Shadow = Shadow()
Constant for no shadow.
Source set: Common
public class Shadow internal constructor(
public val radius: Dp,
public val spread: Dp,
public val offset: DpOffset,
color: Color,
brush: Brush?,
@FloatRange(from = 0.0, to = 1.0) alpha: Float,
public val blendMode: BlendMode,
)
Group of parameters that represent how a drop shadow or inner shadow should be rendered.
Properties
color
Source set: Common
public val color: Color
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.
brush
Source set: Common
public val brush: Brush?
Optional brush to render the shadow with.
alpha
Source set: Common
public val alpha: Float
Opacity of the shadow
Functions
equals
Source set: Common
override fun equals(other: Any?): Boolean
Creates a group of parameters that represent how a drop shadow or inner shadow should be rendered.
Parameters
| radius | The blur radius of the shadow |
| color | The color of the shadow. If Color.Unspecified is provided, Color.Black will be used as a default. |
| spread | Optional parameter to grow the shadow geometry by |
| offset | Optional parameter to offset the shadow within the geometry bounds |
| alpha | Optional opacity of the shadow |
| blendMode | Optional blending algorithm used by the shadow |
hashCode
Source set: Common
override fun hashCode(): Int
toString
Source set: Common
override fun toString(): String