Contents

showText(string:length:)

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

Declaration

func showText(string: UnsafePointer<CChar>, length: Int)

Parameters

  • string:

    An array of characters to draw.

  • length:

    The length of the array specified in the bytes parameter.

Discussion

Core Graphics uses font data provided by the system to map each byte of the array through the encoding vector of the current font to obtain the glyph to display. Note that the font must have been set using selectFont(name:size:textEncoding:). Don’t use CGContextShowText in conjunction with setFont(_:).

See Also

Related Documentation

Drawing Text