Instance Method インスタンスメソッド

draw(_:in:)

Draws a resolved symbol into the context, using the specified rectangle as a layout frame.

Declaration 宣言

func draw(_ symbol: GraphicsContext.ResolvedSymbol, in rect: CGRect)

Parameters パラメータ

symbol

The GraphicsContext.ResolvedSymbol to draw. Get a resolved symbol by calling resolveSymbol(id:) with the identifier that you use to tag the corresponding child view during Canvas initialization.

rect

The rectangle in the current user space to draw the symbol in.

Discussion 議論

The current context state defines the full drawing operation. For example, the current transformation and clip shapes affect how SwiftUI draws the symbol.

See Also 参照

Drawing a Child View