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

draw(_:in:)

Draws text into the context using the specified rectangle as a layout frame.

Declaration 宣言

func draw(_ text: Text, in rect: CGRect)

Parameters パラメータ

text

The Text view to draw. Before drawing, the method converts the view to GraphicsContext.ResolvedText by calling resolve(_:).

rect

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

Discussion 議論

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

See Also 参照

Drawing Text