style(_:)
Returns a shading instance that fills with the given shape style.
Declaration
static func style<S>(_ style: S) -> GraphicsContext.Shading where S : ShapeStyleParameters
- style:
A Shapestyle instance to draw with.
Return Value
A shading instance filled with a shape style.
Discussion
Styles with geometry defined in a unit coordinate space map that space to the rectangle associated with the drawn object. You can adjust that using the in(_:) method. The shape style might affect the blend mode and opacity of the drawn object.