Function

CTRunGetImageBounds

Calculates the image bounds for a glyph range.

Declaration

CGRect CTRunGetImageBounds(CTRunRef run, CGContextRef context, CFRange range);

Parameters

run

The run for which to calculate the image bounds.

context

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

range

The portion of the run to measure. If the length of the range is set to 0, then the measure operation continues from the start index of the range to the end of the run.

Return Value

A rectangle that tightly encloses the paths of the run's glyphs, or, if run, context, or range is invalid, CGRectNull.

See Also

Measuring the Glyph Run

CTLineGetBoundsWithOptions

Calculates the bounds for a line.

CTRunGetTypographicBounds

Gets the typographic bounds of the run.

CTRunGetBaseAdvancesAndOrigins

Copies a range of base advances and origins into user-provided buffers.