setAttachmentSize(_:forGlyphRange:)
Sets the size to use when drawing a glyph that represents an attachment.
Declaration
func setAttachmentSize(_ attachmentSize: NSSize, forGlyphRange glyphRange: NSRange)Parameters
- attachmentSize:
The glyph size to set.
- glyphRange:
The attachment glyph’s position in the glyph stream.
Discussion
For a glyph corresponding to an attachment, this method should be called to set the size for the attachment cell to occupy. The glyph’s value should be NSControlGlyph.
This method is used by the layout mechanism and should be invoked only during typesetting, in almost all cases only by the typesetter. For example, a custom typesetter might invoke it.