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() -> TextBlob
Return 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
font
The font to use for this run
x
The x position for this run
y
The y position for this run
glyphs
The 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
font
The font to use for this run
y
The vertical offset within the blob.
glyphs
The glyphs to use for this run
-
Adds a new horizontally-positioned run to the builder.
Declaration
Parameters
font
The font to use for this run
y
The vertical offset within the blob.
glyphs
The glyphs to use for this run