lineFragmentRect(forGlyphAt:effectiveRange:withoutAdditionalLayout:)
Returns the line fragment rectangle that contains the glyph at the specified glyph index.
Declaration
func lineFragmentRect(forGlyphAt glyphIndex: Int, effectiveRange effectiveGlyphRange: NSRangePointer?, withoutAdditionalLayout flag: Bool) -> NSRectParameters
- glyphIndex:
The glyph for which to return the line fragment rectangle.
- effectiveGlyphRange:
If not
NULL, on output, the range for all glyphs in the line fragment. - flag:
If True, glyph generation and layout are not performed, so this option should not be used unless layout is known to be complete for the range in question, or unless noncontiguous layout is enabled; if False, both are performed as needed.
Return Value
The line fragment in which the given glyph is laid out.
Discussion
This method is primarily for use from within NSTypesetter, after layout is complete for the range in question, but before the layout manager’s call to NSTypesetter has returned. In that case glyph and layout holes have not yet been recalculated, so the layout manager does not yet know that layout is complete for that range, and this variant must be used.
Overriding this method is not recommended. If the line fragment rectangle needs to be modified, that should be done at the typesetter level or by calling setLineFragmentRect(_:forGlyphRange:usedRect:).
See Also
Getting layout information
attachmentSize(forGlyphAt:)drawsOutsideLineFragment(forGlyphAt:)extraLineFragmentRectextraLineFragmentTextContainerextraLineFragmentUsedRectfirstUnlaidCharacterIndex()firstUnlaidGlyphIndex()getFirstUnlaidCharacterIndex(_:glyphIndex:)lineFragmentRect(forGlyphAt:effectiveRange:)lineFragmentUsedRect(forGlyphAt:effectiveRange:)lineFragmentUsedRect(forGlyphAt:effectiveRange:withoutAdditionalLayout:)location(forGlyphAt:)notShownAttribute(forGlyphAt:)truncatedGlyphRange(inLineFragmentForGlyphAt:)