Instance Method


Returns the rectangle within which glyphs should be laid out for a text table block.


func rect(for block: NSTextTableBlock, layoutAt startingPoint: NSPoint, in rect: NSRect, textContainer: NSTextContainer, characterRange charRange: NSRange) -> NSRect



The text table block that wants to determine where to layout its glyphs.


The location, in container coordinates, where layout begins.


The rectangle in which the block is constrained to lie. For top-level blocks, this is the container rectangle of textContainer; for nested blocks, this is the layout rectangle of the enclosing block.


The text container being used for the layout.


The range of the characters whose glyphs are to be drawn.

Return Value

The rectangle within which glyphs should be laid out.


This method is called by the text table block block to determine the rectangle within which glyphs should be laid out for the text table block.

See Also

Determining layout rectangles

func boundsRect(for: NSTextTableBlock, contentRect: NSRect, in: NSRect, textContainer: NSTextContainer, characterRange: NSRange) -> NSRect

Returns the rectangle the text table block actually occupies, including padding, borders, and margins.