animator.skia.TextBlobBuilder¶
- class animator.skia.TextBlobBuilder¶
Bases:
pybind11_builtins.pybind11_object
In Skia, you call the
alloc*
methods of this class with the count of glyphs to create aRunBuffer
object. Then the object is filled with the required data before the next call to another method.However, in this Python binding, the
alloc*
methods do not return theRunBuffer
object. Instead of passing the count of glyphs, you need to call them with the required data directly and it’ll handle the allocation and data filling automatically. All the other parameters are the same as in the C++ API. You can optionally pass a encoding parameter to specify the encoding of the text. These methods return theTextBlobBuilder
object itself for method chaining.- __init__(self: animator.skia.TextBlobBuilder) None ¶
Methods
__init__
(self)allocRun
(self, font, text, x, y, bounds, ...)Sets a new run with glyphs for text.
allocRunPos
(self, font, text, pos, bounds, ...)Sets a new run with glyphs for text at pos.
allocRunPosH
(self, font, text, xpos, y, ...)Sets a new run with glyphs for text at xpos.
allocRunRSXform
(self, font, text, xforms, ...)Sets a new run with glyphs for text with xforms.
allocRunText
(self, font, text, clusters, x, ...)Sets a new run with glyphs for text with supporting clusters and utf8text.
allocRunTextPos
(self, font, text, clusters, ...)Sets a new run with glyphs for text at pos with supporting clusters and utf8text.
allocRunTextPosH
(self, font, text, clusters, ...)Sets a new run with glyphs for text at xpos with supporting clusters and utf8text.
allocRunTextRSXform
(self, font, text, ...)Sets a new run with glyphs for text with xforms and supporting clusters and utf8text.
make
(self)- allocRun(self: animator.skia.TextBlobBuilder, font: animator.skia.Font, text: str, x: float, y: float, bounds: animator.skia.Rect = None, encoding: animator.skia.TextEncoding = <TextEncoding.kUTF8: 0>) animator.skia.TextBlobBuilder ¶
Sets a new run with glyphs for text.
- allocRunPos(self: animator.skia.TextBlobBuilder, font: animator.skia.Font, text: str, pos: List[animator.skia.Point], bounds: animator.skia.Rect = None, encoding: animator.skia.TextEncoding = <TextEncoding.kUTF8: 0>) animator.skia.TextBlobBuilder ¶
Sets a new run with glyphs for text at pos.
- allocRunPosH(self: animator.skia.TextBlobBuilder, font: animator.skia.Font, text: str, xpos: List[float], y: float, bounds: animator.skia.Rect = None, encoding: animator.skia.TextEncoding = <TextEncoding.kUTF8: 0>) animator.skia.TextBlobBuilder ¶
Sets a new run with glyphs for text at xpos.
- allocRunRSXform(self: animator.skia.TextBlobBuilder, font: animator.skia.Font, text: str, xforms: List[animator.skia.RSXform], encoding: animator.skia.TextEncoding = <TextEncoding.kUTF8: 0>) animator.skia.TextBlobBuilder ¶
Sets a new run with glyphs for text with xforms.
- allocRunText(self: animator.skia.TextBlobBuilder, font: animator.skia.Font, text: str, clusters: List[int], x: float, y: float, utf8text: str, bounds: animator.skia.Rect = None, encoding: animator.skia.TextEncoding = <TextEncoding.kUTF8: 0>) animator.skia.TextBlobBuilder ¶
Sets a new run with glyphs for text with supporting clusters and utf8text.
- allocRunTextPos(self: animator.skia.TextBlobBuilder, font: animator.skia.Font, text: str, clusters: List[int], pos: List[animator.skia.Point], utf8text: str, bounds: animator.skia.Rect = None, encoding: animator.skia.TextEncoding = <TextEncoding.kUTF8: 0>) animator.skia.TextBlobBuilder ¶
Sets a new run with glyphs for text at pos with supporting clusters and utf8text.
- allocRunTextPosH(self: animator.skia.TextBlobBuilder, font: animator.skia.Font, text: str, clusters: List[int], xpos: List[float], y: float, utf8text: str, bounds: animator.skia.Rect = None, encoding: animator.skia.TextEncoding = <TextEncoding.kUTF8: 0>) animator.skia.TextBlobBuilder ¶
Sets a new run with glyphs for text at xpos with supporting clusters and utf8text.
- allocRunTextRSXform(self: animator.skia.TextBlobBuilder, font: animator.skia.Font, text: str, clusters: List[int], xforms: List[animator.skia.RSXform], utf8text: str, bounds: animator.skia.Rect = None, encoding: animator.skia.TextEncoding = <TextEncoding.kUTF8: 0>) animator.skia.TextBlobBuilder ¶
Sets a new run with glyphs for text with xforms and supporting clusters and utf8text.
- make(self: animator.skia.TextBlobBuilder) animator.skia.TextBlob ¶