draw(_:in:)
Draws resolved text into the context using the specified rectangle as a layout frame.
Declaration
func draw(_ text: GraphicsContext.ResolvedText, in rect: CGRect)Parameters
- text:
The Resolvedtext to draw. Get resolved text from a Text view by calling Resolve(_:) 4dx65. Alternatively, you can call Draw(_:in:) 5opqf with a Text view, and that method performs the resolution automatically.
- 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.