Pushes the information required to leave an open space.
Optionalwidth: numberOptionalheight: numberOptionalalignment: EmbindEnumEntityOptionalbaseline: EmbindEnumEntityOptionaloffset: numberAdds text to the builder. Forms the proper runs to use the upper-most style on the style_stack.
Returns a Paragraph object that can be used to be layout and paint the text to an Canvas.
Returns the entire Paragraph text (which is useful in case that text was produced as a set of addText calls).
Remove a style from the stack. Useful to apply different styles to chunks of text such as bolding.
Push a style to the stack. The corresponding text added with addText will use the top-most style.
Resets this builder to its initial state, discarding any text, styles, placeholders that have been added, but keeping the initial ParagraphStyle.
is an array of indexes in the input text that point to the start of each grapheme.
The indices are expected to be relative to the UTF-16 representation of the text.
The Intl.Segmenter API can be used as a source for this data.
is an array of indexes in the input text that point to the start of each grapheme.
The indices are expected to be relative to the UTF-8 representation of the text.
is an array of unsigned integers that should be treated as pairs (index, break type) that point to the places of possible line breaking if needed. It should include 0 as the first element. Break type == 0 means soft break, break type == 1 is a hard break.
The indices are expected to be relative to the UTF-16 representation of the text.
Chrome's v8BreakIterator API can be used as a source for this data.
is an array of unsigned integers that should be treated as pairs (index, break type) that point to the places of possible line breaking if needed. It should include 0 as the first element. Break type == 0 means soft break, break type == 1 is a hard break.
The indices are expected to be relative to the UTF-8 representation of the text.
is an array of word edges (starting or ending). You can pass 2 elements (0 as a start of the entire text and text.size as the end). This information is only needed for a specific API method getWords.
The indices are expected to be relative to the UTF-16 representation of the text.
The Intl.Segmenter API can be used as a source for this data.
is an array of word edges (starting or ending). You can pass 2 elements (0 as a start of the entire text and text.size as the end). This information is only needed for a specific API method getWords.
The indices are expected to be relative to the UTF-8 representation of the text.
CanvasKit is built with Emscripten and Embind. Embind adds the following methods to all objects that are exposed with it. This _type field is necessary for the TypeScript compiler to differentiate between opaque types such as Shader and ColorFilter. It doesn't exist at runtime.