Instance Method

lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:

Returns the usage rectangle for the line fragment in which the given glyph is laid and (optionally) by reference the whole range of glyphs that are in that fragment.

Declaration

iOS, Mac Catalyst, tvOS
- (CGRect)lineFragmentUsedRectForGlyphAtIndex:(NSUInteger)glyphIndex effectiveRange:(NSRangePointer)effectiveGlyphRange withoutAdditionalLayout:(BOOL)flag;
macOS
- (NSRect)lineFragmentUsedRectForGlyphAtIndex:(NSUInteger)glyphIndex effectiveRange:(NSRangePointer)effectiveGlyphRange withoutAdditionalLayout:(BOOL)flag;

Parameters

glyphIndex

The glyph for which to return the line fragment used rectangle.

effectiveGlyphRange

If not NULL, on output, the range for all glyphs in the line fragment.

flag

If YES, 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 NO, both are performed as needed.

Return Value

The used rectangle for the line fragment in which the given glyph is laid out.

Discussion

This method causes glyph generation and layout for the line fragment containing the specified glyph, or if noncontiguous layout is not enabled, up to and including that line fragment.

Line fragment used rectangles are always in container coordinates.

Overriding this method is not recommended. If the the line fragment used rectangle needs to be modified, that should be done at the typesetter level or by calling setLineFragmentRect:forGlyphRange:usedRect:.

See Also

Getting Layout Information

- attachmentSizeForGlyphAtIndex:

For a glyph corresponding to an attachment, returns the size for the attachment cell to occupy.

- drawsOutsideLineFragmentForGlyphAtIndex:

Indicates whether the glyph draws outside of its line fragment rectangle.

extraLineFragmentRect

The rectangle defining the extra line fragment for the insertion point at the end of a text (either in an empty text or after a final paragraph separator).

extraLineFragmentTextContainer

The text container that contains the extra line fragment rectangle.

extraLineFragmentUsedRect

The rectangle enclosing the insertion point drawn in the extra line fragment rectangle.

- firstUnlaidCharacterIndex

The index for the first character in the layout manager that has not been laid out.

- firstUnlaidGlyphIndex

The index for the first glyph in the layout manager that has not been laid out.

- getFirstUnlaidCharacterIndex:glyphIndex:

Returns the indexes for the first character and glyph that have invalid layout information.

- lineFragmentRectForGlyphAtIndex:effectiveRange:

Returns the rectangle for the line fragment in which the given glyph is laid out and (optionally), by reference, the whole range of glyphs that are in that fragment.

- lineFragmentRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:

Returns the line fragment rectangle containing the glyph at the given glyph index.

- lineFragmentUsedRectForGlyphAtIndex:effectiveRange:

Returns the usage rectangle for the line fragment in which the given glyph is laid and (optionally) by reference the whole range of glyphs that are in that fragment.

- locationForGlyphAtIndex:

Returns the location for the given glyph within its line fragment.

- notShownAttributeForGlyphAtIndex:

Indicates whether the glyph at the given index is one that isn’t shown.

- truncatedGlyphRangeInLineFragmentForGlyphAtIndex:

Returns the range of truncated glyphs for a line fragment containing the specified index.