showCGGlyphs(_:positions:count:font:textMatrix:attributes:in:)
Renders the glyphs at the specified positions, using the specified attributes.
Declaration
func showCGGlyphs(_ glyphs: UnsafePointer<CGGlyph>, positions: UnsafePointer<CGPoint>, count glyphCount: Int, font: NSFont, textMatrix: CGAffineTransform, attributes: [NSAttributedString.Key : Any] = [:], in CGContext: CGContext)Parameters
- glyphs:
The glyphs to draw, which may include embedded
NULLbytes. - positions:
The positions at which to draw the glyphs in the user space coordinate system.
- glyphCount:
The number of glyphs to draw.
- font:
The font to apply to the graphics state. This value can be different from the Font value in the
attributesargument because of various font substitutions that the system automatically executes. - textMatrix:
The affine transform mapping the text space coordinate system to the user space coordinate system. The
txandtycomponents oftextMatrixare ignored because Quartz overrides them with the glyph positions. - attributes:
A dictionary of glyph attributes. For a list of possible keys and values, see Glyph Attributes.
- CGContext:
A graphics context object already configured with the information in the
font,textMatrix, andattributesparameters
Discussion
The layout manager calls this primitive method when it is time to lay out a set of glyphs in the specified graphics context.
See Also
Drawing
drawBackground(forGlyphRange:at:)drawGlyphs(forGlyphRange:at:)drawStrikethrough(forGlyphRange:strikethroughType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)drawUnderline(forGlyphRange:underlineType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)fillBackgroundRectArray(_:count:forCharacterRange:color:)strikethroughGlyphRange(_:strikethroughType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)underlineGlyphRange(_:underlineType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)