Function

CGContextSetTextMatrix

Sets the current text matrix.

Declaration

void CGContextSetTextMatrix(CGContextRef c, CGAffineTransform t);

Parameters

c

A graphics context.

transform

The text matrix to set.

Discussion

The text matrix specifies the transform from text space to user space. To produce the final text rendering matrix that is used to actually draw the text on the page, Core Graphics concatenates the text matrix with the current transformation matrix and other parameters from the graphics state.

Note that the text matrix is not a part of the graphics state—saving or restoring the graphics state has no effect on the text matrix. The text matrix is an attribute of the graphics context, not of the current font.

See Also

Drawing Text

CGContextGetTextMatrix

Returns the current text matrix.

CGContextGetTextPosition

Returns the location at which text is drawn.

CGContextSelectFont

Sets the font and font size in a graphics context.

Deprecated
CGContextSetCharacterSpacing

Sets the current character spacing.

CGContextSetFont

Sets the platform font in a graphics context.

CGContextSetFontSize

Sets the current font size.

CGContextSetTextDrawingMode

Sets the current text drawing mode.

CGContextSetTextPosition

Sets the location at which text is drawn.

CGContextShowText

Displays a character array at the current text position, a point specified by the current text matrix.

Deprecated
CGContextShowTextAtPoint

Displays a character string at a position you specify.

Deprecated

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