TextBlobBuilder
public final class TextBlobBuilder
A builder object that is used to create a TextBlob.
-
Creates a new instance of the TextBlobBuilder
Declaration
Swift
public init() -
Create the SKTextBlob from all the added runs.
Declaration
Swift
public func build() -> TextBlobReturn Value
the new SKTextBlob if there were runs, otherwise null.
-
Adds a new default-positioned run to the builder.
Declaration
Swift
public func addRun(font: Paint, x: Float, y: Float, glyphs: [ushort])Parameters
fontThe font to use for this run
xThe x position for this run
yThe y position for this run
glyphsThe glyphs to use for this run
-
Adds a new horizontally-positioned run to the builder.
Declaration
Swift
public func addHorizontalRun(font: Paint, y: Float, glyphs: [ushort], positions: [Float])Parameters
fontThe font to use for this run
yThe vertical offset within the blob.
glyphsThe glyphs to use for this run
-
Adds a new horizontally-positioned run to the builder.
Declaration
Parameters
fontThe font to use for this run
yThe vertical offset within the blob.
glyphsThe glyphs to use for this run
View on GitHub
Install in Dash
TextBlobBuilder Class Reference