boundingRect(with:options:)
Calculates and returns a bounding rectangle for the attributed string using the options specified within the specified rectangle in the current graphics context.
Declaration
func boundingRect(with size: NSSize, options: NSString.DrawingOptions = []) -> NSRectParameters
- size:
The size of the rectangle to draw in.
- options:
The string drawing options. See Nsstringdrawingoptions for the possible values.
Return Value
The bounding rectangle in the current graphics context.
Discussion
The origin of the rectangle returned from this method is the first glyph origin.