Instance Method

getFirstUnlaidCharacterIndex(_:glyphIndex:)

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

Declaration

func getFirstUnlaidCharacterIndex(_ charIndex: UnsafeMutablePointer<Int>?, glyphIndex: UnsafeMutablePointer<Int>?)

Parameters

charIndex

On return, if not NULL, the index of the first character that has invalid layout information

glyphIndex

On return, if not NULL, the index of the first glyph that has invalid layout information.

Discussion

Either parameter may be NULL, in which case the receiver simply ignores it.

As part of its implementation, this method calls firstUnlaidCharacterIndex() and firstUnlaidGlyphIndex(). To change this method’s behavior, override those two methods instead of this one.

See Also

Getting Layout Information

func attachmentSize(forGlyphAt: Int) -> CGSize

Returns the size of the attachment glyph at the specified index.

func drawsOutsideLineFragment(forGlyphAt: Int) -> Bool

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

var extraLineFragmentRect: CGRect

The rectangle for the extra line fragment at the end of a document.

var extraLineFragmentTextContainer: NSTextContainer?

The text container that contains the extra line fragment rectangle.

var extraLineFragmentUsedRect: CGRect

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

func firstUnlaidCharacterIndex() -> Int

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

func firstUnlaidGlyphIndex() -> Int

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

func lineFragmentRect(forGlyphAt: Int, effectiveRange: NSRangePointer?) -> CGRect

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

func lineFragmentRect(forGlyphAt: Int, effectiveRange: NSRangePointer?, withoutAdditionalLayout: Bool) -> CGRect

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

func lineFragmentUsedRect(forGlyphAt: Int, effectiveRange: NSRangePointer?) -> CGRect

Returns the usage rectangle for the line fragment and (optionally) returns the whole range of glyphs in that fragment.

func lineFragmentUsedRect(forGlyphAt: Int, effectiveRange: NSRangePointer?, withoutAdditionalLayout: Bool) -> CGRect

Returns the usage rectangle for the line fragment and (optionally) returns the whole range of glyphs that are in that fragment.

func location(forGlyphAt: Int) -> CGPoint

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

func notShownAttribute(forGlyphAt: Int) -> Bool

Indicates whether the glyph at the specified index has a visible representation.

func truncatedGlyphRange(inLineFragmentForGlyphAt: Int) -> NSRange

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