Function

CTRunGetPositionsPtr

Returns a direct pointer for the glyph position array stored in the run.

Declaration

const CGPoint * CTRunGetPositionsPtr(CTRunRef run);

Parameters

run

The run from which to access glyph positions.

Return Value

A valid pointer to an array of CGPoint structures, or NULL.

Discussion

The glyph positions in a run are relative to the origin of the line containing the run. The position array will have a length equal to the value returned by CTRunGetGlyphCount. The caller should be prepared for this function to return NULL even if there are glyphs in the stream. If this function returns NULL, the caller must allocate its own buffer and call CTRunGetPositions to fetch the glyph positions.

See Also

Getting Glyph Run Data

CTRunGetGlyphCount

Gets the glyph count for the run.

CTRunGetAttributes

Returns the attribute dictionary that was used to create the glyph run.

CTRunGetStatus

Returns the run's status.

CTRunGetGlyphsPtr

Returns a direct pointer for the glyph array stored in the run.

CTRunGetGlyphs

Copies a range of glyphs into a user-provided buffer.

CTRunGetPositions

Copies a range of glyph positions into a user-provided buffer.

CTRunGetAdvancesPtr

Returns a direct pointer for the glyph advance array stored in the run.

CTRunGetAdvances

Copies a range of glyph advances into a user-provided buffer.

CTRunGetStringIndicesPtr

Returns a direct pointer for the string indices stored in the run.

CTRunGetStringIndices

Copies a range of string indices into a user-provided buffer.

CTRunGetStringRange

Gets the range of characters that originally spawned the glyphs in the run.

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