TextBlobBuilder

Constructors

Link copied to clipboard
constructor()

Constructs empty TextBlobBuilder. By default, TextBlobBuilder has no runs.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
expect open val isClosed: Boolean

Check if underlying resource is closed.

Functions

Link copied to clipboard
fun appendRun(font: Font, text: String, x: Float, y: Float, bounds: Rect? = null): TextBlobBuilder
fun appendRun(font: Font?, glyphs: ShortArray?, x: Float, y: Float, bounds: Rect?): TextBlobBuilder

Glyphs are positioned on a baseline at (x, y), using font metrics to determine their relative placement.

Link copied to clipboard
fun appendRunPos(font: Font?, glyphs: ShortArray, pos: Array<Point>, bounds: Rect? = null): TextBlobBuilder

Glyphs are positioned at positions from pos.

Link copied to clipboard
fun appendRunPosH(font: Font?, glyphs: ShortArray, xs: FloatArray, y: Float, bounds: Rect? = null): TextBlobBuilder

Glyphs are positioned on a baseline at y, using x-axis positions from xs.

Link copied to clipboard
Link copied to clipboard
fun build(): TextBlob?

Returns TextBlob built from runs of glyphs added by builder. Returned TextBlob is immutable; it may be copied, but its contents may not be altered. Returns null if no runs of glyphs were added by builder.

Link copied to clipboard
expect open fun close()

Free underlying native resource, peer is useless afterwards.

Link copied to clipboard
expect open override fun toString(): String