CTFrame

A frame.

Overview

A frame contains multiple lines of text. The frame object is the output resulting from the text-framing process performed by a CTFramesetter object.

You can draw the entire text frame directly into the current graphic context. The frame object contains an array of line objects that can be retrieved for individual rendering or to get glyph information.

Topics

Getting Frame Data

func CTFrameGetStringRange(CTFrame) -> CFRange

Returns the range of characters originally requested to fill the frame.

func CTFrameGetVisibleStringRange(CTFrame) -> CFRange

Returns the range of characters that actually fit in the frame.

func CTFrameGetPath(CTFrame) -> CGPath

Returns the path used to create the frame.

func CTFrameGetFrameAttributes(CTFrame) -> CFDictionary?

Returns the frame attributes used to create the frame.

Getting Lines

func CTFrameGetLines(CTFrame) -> CFArray

Returns an array of lines stored in the frame.

Drawing the Frame

func CTFrameDraw(CTFrame, CGContext)

Draws an entire frame into a context.

Getting the Type Identifier

func CTFrameGetTypeID() -> CFTypeID

Returns the type identifier for the CTFrame opaque type.

Data Types

class CTFrame

A reference to a Core text frame object.

enum CTFramePathFillRule

The type for constants that specify a fill rule used by a frame.

Constants

enum CTFrameProgression

These constants specify frame progression types.

CTFramePathFillRule Constants

These constants specify the fill rule used by a frame

kCTFrameProgressionAttributeName

Specifies progression for a frame.

kCTFramePathFillRuleAttributeName

The key used to specify the fill rule for a frame.

kCTFramePathWidthAttributeName

The key used to specify the frame width.

kCTFrameClippingPathsAttributeName

Specifies array of paths to clip frame.

kCTFramePathClippingPathAttributeName

Specifies clipping path. This attribute is valid only in a dictionary contained in an array specified by kCTFrameClippingPathsAttributeName.

See Also

Opaque Types

CTFont

A font object.

CTFramesetter

Generate text frames.

CTGlyphInfo

Override a font's specified mapping from Unicode to the glyph ID.

CTLine

A line of text.

CTParagraphStyle

Paragraph or ruler attributes in an attributed string.

CTTextTab

A tab in a paragraph style, storing an alignment type and location.

CTTypesetter

A typesetter which performs line layout.