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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software