Type Property 型プロパティ

role

An indication of how to style a shape.

Declaration 宣言

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.