CTLineGetTypographicBounds(_:_:_:_:)
Calculates the typographic bounds of a line.
Declaration
func CTLineGetTypographicBounds(_ line: CTLine, _ ascent: UnsafeMutablePointer<CGFloat>?, _ descent: UnsafeMutablePointer<CGFloat>?, _ leading: UnsafeMutablePointer<CGFloat>?) -> DoubleParameters
- line:
The line whose typographic bounds are calculated.
- ascent:
On output, the ascent of the line. This parameter can be set to
NULLif not needed. - descent:
On output, the descent of the line. This parameter can be set to
NULLif not needed. - leading:
On output, the leading of the line. This parameter can be set to
NULLif not needed.
Return Value
The typographic width of the line. If the line is invalid, this function returns 0.