---
title: "draw(at:in:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/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](uikit/nstextlayoutfragment/layoutfragmentframe.md)
- [renderingSurfaceBounds](uikit/nstextlayoutfragment/renderingsurfacebounds.md)
- [invalidateLayout()](uikit/nstextlayoutfragment/invalidatelayout().md)
- [textAttachmentViewProviders](uikit/nstextlayoutfragment/textattachmentviewproviders.md)
- [frameForTextAttachment(at:)](uikit/nstextlayoutfragment/framefortextattachment(at:).md)
