shadow(_:)
Applies the specified shadow effect to the shape style.
Declaration
func shadow(_ style: ShadowStyle) -> some ShapeStyle
Parameters
- style:
The shadow style to apply.
Return Value
A new shape style that uses the specified shadow style.
Discussion
For example, you can create a rectangle that adds a drop shadow to the red shape style.
Rectangle().fill(.red.shadow(.drop(radius: 2, y: 3)))