Function

CTLineGetImageBounds(_:_:)

Calculates the image bounds for a line.

Declaration

func CTLineGetImageBounds(_ line: CTLine, _ context: CGContext?) -> CGRect

Parameters

line

The line whose image bounds are calculated.

context

The context for which the image bounds are calculated. This is required because the context could have settings in it that would cause changes in the image bounds.

Return Value

A rectangle that tightly encloses the paths of the line's glyphs, or, if the line or context is invalid, null.