Carbon


ATSUSetRunStyle

Header: ATSUnicode.h Carbon status: Supported

Assigns or updates style runs.

OSStatus ATSUSetRunStyle (
    ATSUTextLayout iTextLayout, 
    ATSUStyle iStyle, 
    UniCharArrayOffset iRunStart, 
    UniCharCount iRunLength
);
Parameter descriptions
iTextLayout

A reference to an initialized text layout object whose style runs you want to assign or update. You cannot pass NULL for this parameter.

iStyle

A reference to a valid style object whose attributes, font features, and font variations you want to set or replace, depending upon the state of the style object. You cannot pass NULL for this parameter.

iRunStart

The edge offset in backing store memory that corresponds to the beginning of style run whose contents you want to set or replace.

iRunLength

The length of the style run of style run whose contents you want to set or replace.

function result

A result code.

DISCUSSION

The ATSUSetRunStyle function assigns new style runs or updates existing style runs. For uninitialized text layout objects, ATSUSetRunStyle assigns new style runs; for initialized text layout objects, it updates replaces all previously set attributes, font features, and font variations in the iStyle parameter. After completion, ATSUSetRunStyle adjusts the lengths of the style runs on either side of the new or updated style run.

You are responsible for disposing of the memory allocated for the new style run when you dispose of it. Calling the function ATSUDisposeTextLayout will not do so.

If the user deletes, inserts, or moves text in a text layout object and the range of text covers the entire text buffer, you should

You can then call the function ATSUDrawText to display the updated text.

ATSUSetRunStyle may allocate memory in your application heap, unless you designate a different heap by calling the function ATSUCreateMemorySetting.

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)