| Derived from | CFType |
| Framework | ApplicationServices/CoreText |
| Declared in | CTFrame.h |
The CTFrame opaque type represents a frame containing multiple lines of text. The frame object is the output resulting from the text-framing process performed by a framesetter 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.
Draws an entire frame into a context.
void CTFrameDraw( CTFrameRef frame, CGContextRef context );
The frame to draw.
The context in which to draw the frame.
If both the frame and the context are valid, the frame is drawn in the context. This call can leave the context in any state and does not flush it after the draw operation.
CTFrame.hReturns the frame attributes used to create the frame.
CFDictionaryRef CTFrameGetFrameAttributes( CTFrameRef frame );
The frame whose attributes are returned.
A reference to a CFDictionary object containing the frame attributes that were used to create the frame, or, if the frame was created without any frame attributes, NULL.
You can create a frame with an attributes dictionary to control various aspects of the framing process. These attributes are different from the ones used to create an attributed string.
CTFrame.hCopies a range of line origins for a frame.
void CTFrameGetLineOrigins( CTFrameRef frame, CFRange range, CGPoint origins[] );
The frame whose line origin array is copied.
The range of line origins you wish to copy. If the length of the range is 0, then the copy operation continues from the start index of the range to the last line origin.
The buffer to which the origins are copied. The buffer must have at least as many elements as specified by range's length.
This function copies a range of CGPoint structures. Each CGPoint is the origin of the corresponding line in the array of lines returned by CTFrameGetLines, relative to the origin of the frame's path. The maximum number of line origins returned by this function is the count of the array of lines.
CTFrame.hReturns an array of lines stored in the frame.
CFArrayRef CTFrameGetLines( CTFrameRef frame );
The frame whose line array is returned.
A CFArray object containing the CTLine objects that make up the frame, or, if there are no lines in the frame, an array with no elements.
CTFrame.hReturns the path used to create the frame.
CGPathRef CTFrameGetPath( CTFrameRef frame );
The frame whose path is returned.
CTFrame.hReturns the range of characters originally requested to fill the frame.
CFRange CTFrameGetStringRange( CTFrameRef frame );
The frame whose character range is returned.
A CFRange structure containing the backing store range of characters that were originally requested to fill the frame, or, if the function call is not successful, an empty range.
CTFrame.hReturns the type identifier for the CTFrame opaque type.
CFTypeID CTFrameGetTypeID( void );
The type identifier for the CTFrame opaque type.
CTFrame.hReturns the range of characters that actually fit in the frame.
CFRange CTFrameGetVisibleStringRange( CTFrameRef frame );
The frame whose visible character range is returned.
A CFRange structure containing the backing store range of characters that fit into the frame, or if the function call is not successful or no characters fit in the frame, an empty range.
This function can be used to cascade frames, because it returns the range of characters that can be seen in the frame. The next frame would start where this frame ends.
CTFrame.hA reference to a Core text frame object.
typedef const struct __CTFrame *CTFrameRef;
CTFrame.hThese constants specify frame progression types.
enum{
kCTFrameProgressionTopToBottom = 0,
kCTFrameProgressionRightToLeft = 1
};
typedef uint32_t CTFrameProgression;
kCTFrameProgressionTopToBottomLines are stacked top to bottom for horizontal text.
Available in Mac OS X v10.5 and later.
Declared in CTFrame.h
kCTFrameProgressionRightToLeftLines are stacked right to left for vertical text.
Available in Mac OS X v10.5 and later.
Declared in CTFrame.h
The lines of text within a frame may be stacked for either horizontal or vertical text. Values are enumerated for each stacking type supported by CTFrame. Frames created with a progression type specifying vertical text rotate lines 90 degrees counterclockwise when drawing.
CTFrame.hSpecifies progression for a frame.
const CFStringRef kCTFrameProgressionAttributeName;
kCTFrameProgressionAttributeNameA CFNumberRef object containing a “CTFrameProgression” constant. The default is kCTFrameProgressionTopToBottom.
Available in Mac OS X v10.5 and later.
Declared in CTFrame.h
This value determines the line-stacking behavior for a frame and does not affect the appearance of the glyphs within that frame.
CTFrame.h
Last updated: 2007-05-01