---
title: CGContextSetTextPosition
framework: coregraphics
role: symbol
role_heading: Function
path: coregraphics/cgcontextsettextposition
---

# CGContextSetTextPosition

Sets the location at which text is drawn.

## Declaration

```occ
extern void CGContextSetTextPosition(CGContextRef c, CGFloat x, CGFloat y);
```

## Parameters

- `c`: A graphics context.
- `x`: A value for the x-coordinate at which to draw the text, in user space coordinates.
- `y`: A value for the y-coordinate at which to draw the text, in user space coordinates.

## See Also

### Drawing Text

- [textMatrix](coregraphics/cgcontext/textmatrix.md)
- [CGContextSetTextMatrix](coregraphics/cgcontextsettextmatrix.md)
- [CGContextGetTextPosition](coregraphics/cgcontextgettextposition.md)
- [selectFont(name:size:textEncoding:)](coregraphics/cgcontext/selectfont(name:size:textencoding:).md)
- [setCharacterSpacing(_:)](coregraphics/cgcontext/setcharacterspacing(_:).md)
- [setFont(_:)](coregraphics/cgcontext/setfont(_:).md)
- [setFontSize(_:)](coregraphics/cgcontext/setfontsize(_:).md)
- [setTextDrawingMode(_:)](coregraphics/cgcontext/settextdrawingmode(_:).md)
- [setAllowsFontSmoothing(_:)](coregraphics/cgcontext/setallowsfontsmoothing(_:).md)
- [setAllowsFontSubpixelPositioning(_:)](coregraphics/cgcontext/setallowsfontsubpixelpositioning(_:).md)
- [setAllowsFontSubpixelQuantization(_:)](coregraphics/cgcontext/setallowsfontsubpixelquantization(_:).md)
- [setShouldSmoothFonts(_:)](coregraphics/cgcontext/setshouldsmoothfonts(_:).md)
- [setShouldSubpixelPositionFonts(_:)](coregraphics/cgcontext/setshouldsubpixelpositionfonts(_:).md)
- [setShouldSubpixelQuantizeFonts(_:)](coregraphics/cgcontext/setshouldsubpixelquantizefonts(_:).md)
- [showGlyphs(g:count:)](coregraphics/cgcontext/showglyphs(g:count:).md)
