Carbon


ATSUGetContinuousAttributes

Header: ATSUnicode.h Carbon status: Supported

Finds the style run information that is continuous over a range of text.

OSStatus ATSUGetContinuousAttributes (
    ATSUTextLayout iTextLayout, 
    UniCharArrayOffset iOffset, 
    UniCharCount iLength, 
    ATSUStyle oStyle
);
Parameter descriptions
iTextLayout

A reference to an initialized text layout object whose continuous style run information you wish to determine. You cannot pass NULL for this parameter.

iOffset

The edge offset corresponding to the beginning of the range of text whose continuous style run information you want to determine. To specify the beginning of the text buffer, pass the constant kATSUFromTextBeginning, described in “Text Offset Constant”. If the specified range of text is outside the text buffer, ATSUGetContinuousAttributes returns the result code kATSUInvalidTextRangeErr.

iLength

The length of the range of text whose style run information you want to determine. If you want the range of text to extend to the end of the text buffer, pass the constant kATSUToTextEnd, described in “Text Offset and Length Constants”. If the specified range of text is outside the text buffer, ATSUGetContinuousAttributes returns the result code kATSUInvalidTextRangeErr.

oStyle

On return, a pointer to a reference to a style object containing those attributes, font features, and font variations that are the same for the range of text specified in the iOffset and iRunLength parameters. You cannot pass NULL for this parameter.

function result

A result code.

DISCUSSION

The ATSUGetContinuousAttributes function finds all the style run information, including any unset values, that is the same over a range of text. You should call ATSUGetContinuousAttributes to determine the style run information that remains constant over text that has been selected by the user. For example, the user might select the entire text block associated with a text layout object or a portion of it, then choose a different font family from your menu to render the text. ATSUGetContinuousAttributes will determine whether the style is plain, boldfaced, italicized, underlined, condensed, or extended.

To determine previously set style run information that is the same over a range of text, call the function ATSUGetRunStyle.

VERSION NOTES

Available beginning with ATSUI 1.0.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.5 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)