![]() |
TXNDrawCFStringTextBox |
||||
Header: | MacTextEditor.h | Carbon status: | Under Evaluation | |
Draws a CFString in the specified rectangle. You do not need to initialize MLTE to use this function.
OSStatus TXNDrawCFStringTextBox ( CFStringRef iText, Rect *ioBox, ATSUStyle iStyle, TXNTextBoxOptionsData *iOptions );
A reference to the string you want drawn in the text box.
A pointer to the rectangle in which the text is to be displayed. On return, iobox.bottom is updated to reflect the total height of the text. If you use kTXNUseVerticalTextMask, iobox.left is also updated.
An ATSUI style to use to display the text. This parameter is optional. If you pass NULL, the style associated with the current graphics port is used.
A pointer to a TXNTextBoxOptionsData structure associated with this text object. This is optional. You can use ioOptions to specify a number of options, such as to display text vertically, align text, display text flush, and do automatic font fallbacks for unknown text. You can also specify an ATSUI style to speed up display. If you do not specify an ATSUI style, the function uses the style associated with the current graphics port and creates an ATSUI style.
A result code.
A CFString (Core Foundation string) object is an array of Unicode characters along with a count of the number of characters in the string. A CFString object is stored as efficiently as possible, so the memory required to store the string is often less than that required to store a simple array of Unicode characters.
If you need to, you should first call the EraseRect function. The drawing is clipped to the rectangle unless you specify a rotation.
Under evaluation for Carbon. Available in Carbon 1.1 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)