`CTTypesetterSuggestLineBreakWithOffset`这个上下文中的`offset`是什么?

时间:2014-05-26 12:40:14

标签: core-text

我无法理解这个变量offset的作用。如果我设置随机任意值,我无法看到任何变化。那它是做什么的?

文档说

@function   CTTypesetterSuggestLineBreakWithOffset
@abstract   Suggests a contextual line break point based on the width
            provided.

@discussion The line break can be triggered either by a hard break character
            in the stream or by filling the specified width with characters.

    ... 

@param      offset
            The line position offset.

@result     The value returned is a count of the characters from startIndex
            that would cause the line break. This value returned can be used
            to construct a character range for CTTypesetterCreateLine.


CFIndex CTTypesetterSuggestLineBreakWithOffset(
    CTTypesetterRef typesetter,
    CFIndex startIndex,
    double width,
    double offset ) CT_AVAILABLE(10_6, 3_2);

0 个答案:

没有答案