boundsRect(forContentRect:in:textContainer:characterRange:)
Returns the rectangle the text in the block actually occupies, including padding, borders, and margins.
Declaration
func boundsRect(forContentRect contentRect: NSRect, in rect: NSRect, textContainer: NSTextContainer, characterRange charRange: NSRange) -> NSRectParameters
- contentRect:
The actual rectangle in which the text was laid out, as determined by Rectforlayout(at:in:textcontainer:characterrange:).
- rect:
The initial rectangle in
textContainerproposed by the typesetter. - textContainer:
The text container being used for the layout.
- charRange:
The range of the characters in the Nstextstorage object whose glyphs are to be drawn.
Return Value
The rectangle the text in the block actually occupies, including padding, borders, and margins.
Discussion
This methods is called by the typesetter after the text block is laid out to return the rectangle the text in the block actually occupies, including padding, borders, and margins.