typedef const struct CF_BRIDGED_TYPE(id) __CTLine * CTLineRef;
typedef CF_OPTIONS(CFOptionFlags, CTLineBoundsOptions) {
kCTLineBoundsExcludeTypographicLeading = 1 << 0,
kCTLineBoundsExcludeTypographicShifts = 1 << 1,
kCTLineBoundsUseHangingPunctuation = 1 << 2,
kCTLineBoundsUseGlyphPathBounds = 1 << 3,
kCTLineBoundsUseOpticalBounds = 1 << 4,
kCTLineBoundsIncludeLanguageExtents CT_ENUM_AVAILABLE(10_11, 8_0) = 1 << 5,
};
typedef CF_ENUM(uint32_t, CTLineTruncationType) {
kCTLineTruncationStart = 0,
kCTLineTruncationEnd = 1,
kCTLineTruncationMiddle = 2
};
CFTypeID CTLineGetTypeID( void ) CT_AVAILABLE(10_5, 3_2);
CTLineRef CTLineCreateWithAttributedString(
CFAttributedStringRef attrString ) CT_AVAILABLE(10_5, 3_2);
CTLineRef __nullable CTLineCreateTruncatedLine(
CTLineRef line,
double width,
CTLineTruncationType truncationType,
CTLineRef __nullable truncationToken ) CT_AVAILABLE(10_5, 3_2);
CTLineRef __nullable CTLineCreateJustifiedLine(
CTLineRef line,
CGFloat justificationFactor,
double justificationWidth ) CT_AVAILABLE(10_5, 3_2);
CFIndex CTLineGetGlyphCount(
CTLineRef line ) CT_AVAILABLE(10_5, 3_2);
CFArrayRef CTLineGetGlyphRuns(
CTLineRef line ) CT_AVAILABLE(10_5, 3_2);
CFRange CTLineGetStringRange(
CTLineRef line ) CT_AVAILABLE(10_5, 3_2);
double CTLineGetPenOffsetForFlush(
CTLineRef line,
CGFloat flushFactor,
double flushWidth ) CT_AVAILABLE(10_5, 3_2);
void CTLineDraw(
CTLineRef line,
CGContextRef context ) CT_AVAILABLE(10_5, 3_2);
double CTLineGetTypographicBounds(
CTLineRef line,
CGFloat * __nullable ascent,
CGFloat * __nullable descent,
CGFloat * __nullable leading ) CT_AVAILABLE(10_5, 3_2);
CGRect CTLineGetBoundsWithOptions(
CTLineRef line,
CTLineBoundsOptions options ) CT_AVAILABLE(10_8, 6_0);
double CTLineGetTrailingWhitespaceWidth(
CTLineRef line ) CT_AVAILABLE(10_5, 3_2);
CGRect CTLineGetImageBounds(
CTLineRef line,
CGContextRef __nullable context ) CT_AVAILABLE(10_5, 3_2);
CFIndex CTLineGetStringIndexForPosition(
CTLineRef line,
CGPoint position ) CT_AVAILABLE(10_5, 3_2);
CGFloat CTLineGetOffsetForStringIndex(
CTLineRef line,
CFIndex charIndex,
CGFloat * __nullable secondaryOffset ) CT_AVAILABLE(10_5, 3_2);
void CTLineEnumerateCaretOffsets(
CTLineRef line,
void (^block)(double offset, CFIndex charIndex, bool leadingEdge, bool* stop) ) CT_AVAILABLE(10_11, 9_0);
CTLine
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...