Added in API level 31
GlyphsConsumer
interface GlyphsConsumer
android.text.TextShaper.GlyphsConsumer |
A consumer interface for accepting text shape result.
Summary
Public methods | |
---|---|
abstract Unit |
accept(start: Int, count: Int, glyphs: PositionedGlyphs, paint: TextPaint) Accept text shape result. |
Public methods
accept
Added in API level 31
abstract fun accept(
start: Int,
count: Int,
glyphs: PositionedGlyphs,
paint: TextPaint
): Unit
Accept text shape result. The implementation must not keep reference of paint since it will be mutated for the subsequent styles. Also, for saving heap size, keep only necessary members in the TextPaint
instead of copying TextPaint
object.
Parameters | |
---|---|
start |
Int: The start index of the shaped text. Value is 0 or greater |
count |
Int: The length of the shaped text. Value is 0 or greater |
glyphs |
PositionedGlyphs: The shape result. This value cannot be null . |
paint |
TextPaint: The paint to be used for drawing. This value cannot be null . |