Instance Method

setTextDrawingMode(_:)

Sets the current text drawing mode.

Declaration

func setTextDrawingMode(_ mode: CGTextDrawingMode)

Parameters

mode

A text drawing mode (such as CGTextDrawingMode.fill or CGTextDrawingMode.stroke) that specifies how Core Graphics renders individual glyphs in a graphics context. See CGTextDrawingMode for a complete list.

See Also

Drawing Text

var textMatrix: CGAffineTransform

Returns the current text matrix.

var textPosition: CGPoint

Returns the location at which text is drawn.

func selectFont(name: UnsafePointer<Int8>, size: CGFloat, textEncoding: CGTextEncoding)

Sets the font and font size in a graphics context.

Deprecated
func setCharacterSpacing(CGFloat)

Sets the current character spacing.

func setFont(CGFont)

Sets the platform font in a graphics context.

func setFontSize(CGFloat)

Sets the current font size.

enum CGTextDrawingMode

Modes for rendering text.

func setAllowsFontSmoothing(Bool)

Sets whether or not to allow font smoothing for a graphics context.

func setAllowsFontSubpixelPositioning(Bool)

Sets whether or not to allow subpixel positioning for a graphics context.

func setAllowsFontSubpixelQuantization(Bool)

Sets whether or not to allow subpixel quantization for a graphics context.

func setShouldSmoothFonts(Bool)

Enables or disables font smoothing in a graphics context.

func setShouldSubpixelPositionFonts(Bool)

Enables or disables subpixel positioning in a graphics context.

func setShouldSubpixelQuantizeFonts(Bool)

Enables or disables subpixel quantization in a graphics context.

func showGlyphs(g: UnsafePointer<CGGlyph>?, count: Int)

Displays an array of glyphs at the current text position.

Deprecated
func showGlyphs([CGGlyph], at: [CGPoint])

Draws a set of glyphs at a set of corresponding positions.

func showGlyphsAtPoint(x: CGFloat, y: CGFloat, glyphs: UnsafePointer<CGGlyph>?, count: Int)

Displays an array of glyphs at a position you specify.

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

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

Deprecated
func showTextAtPoint(x: CGFloat, y: CGFloat, string: UnsafePointer<Int8>, length: Int)

Displays a character string at a position you specify.

Deprecated