---
title: "draw(_:at:anchor:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/graphicscontext/draw(_:at:anchor:)-7l217"
---

# draw(_:at:anchor:)

Draws an image into the context, aligning an anchor within the image to a point in the context.

## Declaration

```swift
func draw(_ image: Image, at point: CGPoint, anchor: UnitPoint = .center)
```

## Parameters

- `image`: The doc://com.apple.SwiftUI/documentation/SwiftUI/Image to draw. Before drawing, the method converts the image to a doc://com.apple.SwiftUI/documentation/SwiftUI/GraphicsContext/ResolvedImage by calling doc://com.apple.SwiftUI/documentation/SwiftUI/GraphicsContext/resolve(_:)-898z6.
- `point`: A point within the rectangle of the resolved image to anchor to a point in the context.
- `anchor`: A doc://com.apple.SwiftUI/documentation/SwiftUI/UnitPoint within the context to align the image with. The default is doc://com.apple.SwiftUI/documentation/SwiftUI/UnitPoint/center.

## Discussion

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