---
title: "draw(at:in:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextlayoutfragment/draw(at:in:)"
---

# draw(at:in:)

Renders the visual representation of this element in the specified graphics context.

## Declaration

```swift
func draw(at point: CGPoint, in context: CGContext)
```

## Parameters

- `point`: The origin as a doc://com.apple.documentation/documentation/CoreFoundation/CGPoint.
- `context`: The rendering context.

## See Also

### Drawing the fragment and attachments

- [layoutFragmentFrame](appkit/nstextlayoutfragment/layoutfragmentframe.md)
- [renderingSurfaceBounds](appkit/nstextlayoutfragment/renderingsurfacebounds.md)
- [invalidateLayout()](appkit/nstextlayoutfragment/invalidatelayout().md)
- [textAttachmentViewProviders](appkit/nstextlayoutfragment/textattachmentviewproviders.md)
- [frameForTextAttachment(at:)](appkit/nstextlayoutfragment/framefortextattachment(at:).md)
