---
title: "draw(_:in:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/graphicscontext/draw(_:in:)"
---

# draw(_:in:)

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

## Declaration

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

## Parameters

- `symbol`: The doc://com.apple.SwiftUI/documentation/SwiftUI/GraphicsContext/ResolvedSymbol to draw. Get a resolved symbol by calling doc://com.apple.SwiftUI/documentation/SwiftUI/GraphicsContext/resolveSymbol(id:) with the identifier that you use to tag the corresponding child view during doc://com.apple.SwiftUI/documentation/SwiftUI/Canvas initialization.
- `rect`: The rectangle in the current user space to draw the symbol in.

## Discussion

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

- [draw(_:in:style:)](swiftui/graphicscontext/draw(_:in:style:).md)
- [draw(_:at:anchor:)](swiftui/graphicscontext/draw(_:at:anchor:).md)
