Contents

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 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 images, text, and views