Platforms to show: All Mac Windows Linux Cross-Platform
CTLineMBS class
Super class: CFObjectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | CoreText | MBS MacCG Plugin | 14.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
A CTLine object contains an array of glyph runs. Line objects are created by the typesetter during a framesetting operation and can draw themselves directly into a graphics context.
Subclass of the CFObjectMBS class.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 4 properties
- property GlyphCount as Integer
- property StringRangeLength as Integer
- property StringRangeLocation as Integer
- property TrailingWhitespaceWidth as Double
- 11 methods
- method Bounds(options as Integer = 0) as CGRectMBS
- method Constructor Private
- method CreateJustifiedLine(justificationFactor as Double, justificationWidth as Double) as CTLineMBS
- method CreateTruncatedLine(width as Double, truncationType as Integer, truncationToken as CTLineMBS = nil) as CTLineMBS
- method Draw(context as CGContextMBS)
- method GlyphRuns as CTRunMBS()
- method ImageBounds(context as CGContextMBS) as CGRectMBS
- method OffsetForStringIndex(charIndex as Integer, byref secondaryOffset as Double) as Double
- method PenOffsetForFlush(flushFactor as Double, flushWidth as Double) as Double
- method StringIndexForPosition(position as CGPointMBS) as Integer
- method TypographicBounds(byref ascent as Double, byref descent as Double, byref leading as Double) as Double
- 2 shared methods
- shared method Available as boolean
- shared method CreateWithAttributedString(s as CFAttributedStringMBS) as CTLineMBS
- 8 constants
Line Bounds
Constant | Value | Description |
---|---|---|
kCTLineBoundsExcludeTypographicLeading | 1 |
Pass this option to exclude typographic leading. |
kCTLineBoundsExcludeTypographicShifts | 2 |
Pass this option to ignore cross-stream shifts due to positioning (such as kerning or baseline alignment). |
kCTLineBoundsUseGlyphPathBounds | 8 |
Pass this option to use glyph path bounds rather than the default typographic bounds. |
kCTLineBoundsUseHangingPunctuation | 4 |
Normally line bounds include all glyphs; pass this option to treat standard punctuation hanging off either end of the line as fully hanging. |
kCTLineBoundsUseOpticalBounds | 16 |
Pass this option to use optical bounds. This option overrides kCTLineBoundsUseGlyphPathBounds. |
Truncate Types
Constant | Value | Description |
---|---|---|
kCTLineTruncationEnd | 1 |
Truncate the end of the line, leaving the start portion visible. |
kCTLineTruncationMiddle | 2 |
Truncate the middle of the line, leaving both the start and the end portions visible. |
kCTLineTruncationStart | 0 |
Truncate the beginning of the line, leaving the end portion visible. |
Super class CFObjectMBS
- 5 properties
- property Handle as Integer
- property Hash as Integer
- property Lasterror as Integer
- property Type as Integer
- property TypeDescription as String
- 9 methods
- method close
- method DeepCopy as CFObjectMBS
- method EncodedData as MemoryBlock
- method Equal(o as CFObjectMBS) as boolean
- method ReleaseObject
- method RetainCount as Integer
- method RetainObject
- method XML as CFBinaryDataMBS
- method XMLdata as String
- shared method NewCFObject(handle as Integer) as CFObjectMBS
This class has no sub classes.
Some methods using this class:
- CTFrameMBS.Lines as CTLineMBS()
- CTTypesetterMBS.CreateLine(location as Integer, length as Integer, offset as Double = 0.0) as CTLineMBS
Some examples using this class:
Blog Entries
The items on this page are in the following plugins: MBS MacCF Plugin, MBS MacCG Plugin.
CTGlyphInfoMBS - CTMutableFontCollectionMBS