Draws a complete run or part of one.


func CTRunDraw(_ run: CTRun, _ context: CGContext, _ range: CFRange)



The run to draw.


The context into which to draw the run.


The portion of the run to draw. If the length of the range is set to 0, then the draw operation continues from the start index of the range to the end of the run.


This is a convenience call, because the run could be drawn by accessing the glyphs. This call can leave the graphics context in any state and does not flush the context after the draw operation.

See Also

Drawing the Glyph Run

func CTRunGetTextMatrix(CTRun) -> CGAffineTransform

Returns the text matrix needed to draw this run.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software