getLineFragmentRect(_:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:)
Calculates the line fragment rectangle and the portion of the rectangle that contains marks.
Declaration
func getLineFragmentRect(_ lineFragmentRect: UnsafeMutablePointer<NSRect>, usedRect lineFragmentUsedRect: UnsafeMutablePointer<NSRect>, forParagraphSeparatorGlyphRange paragraphSeparatorGlyphRange: NSRange, atProposedOrigin lineOrigin: NSPoint)Discussion
The method returns the calculated line fragment rectangle in lineFragmentRect, and it returns the used rectangle (the portion of the line fragment rectangle that actually contains marks) in lineFragmentUsedRect. The paragraphSeparatorGlyphRange is the range of glyphs under consideration, and lineOrigin is the origin point of the line fragment rectangle. A paragraphSeparatorGlyphRange with length 0 indicates an extra line fragment (which occurs if the last character in the paragraph is a line separator.)
See Also
Laying Out Glyphs
boundingBox(forControlGlyphAt:for:proposedLineFragment:glyphPosition:characterIndex:)hyphenCharacter(forGlyphAt:)hyphenationFactor(forGlyphAt:)shouldBreakLine(byHyphenatingBeforeCharacterAt:)shouldBreakLine(byWordBeforeCharacterAt:)willSetLineFragmentRect(_:forGlyphRange:usedRect:baselineOffset:)setHardInvalidation(_:forGlyphRange:)