role
An indication of how to style a shape.
Declaration
nonisolated static var role: ShapeRole { get }Discussion
SwiftUI looks at a shape’s role when deciding how to apply a ShapeStyle at render time. The Shape protocol provides a default implementation with a value of ShapeRole.fill. If you create a composite shape, you can provide an override of this property to return another value, if appropriate.