AbstractTextPrimitive
AbstractTextPrimitive ⇐ AbstractPrimitive
Kind: global abstract class
Extends: AbstractPrimitive
Properties
Name | Type | Description |
---|---|---|
maxWidth | number | The maximum width of the primitive (in pixels) when defined in auto width mode |
text | String | The text content |
color | String | The text color represented by a #RRGGBB hexadecimal notation |
size | number | The size of text (in pixels) |
family | String | The family of text |
lineHeight | number | The line height (in pixels) |
overflow | boolean | The overflow which is set to true otherwise false will allow to draw outside the view |
type | String | The type of primitive (text, rectangle, image) |
align | String | The text alignment (left, right, center) |
textTransform | String | The text capitalization (uppercase, lowercase) |
ellipsis | boolean | Flag to enable ellipsis if the text overflows |
maxLines | number | The maximum number of lines to display (Ignored if width property is not set) |
letterSpacing | number | Value added to the natural spacing between characters while rendering the text (in pixels) |
wordBreak | String | To set in order to know how a word break appears whenever a text overflow its container. normal : no word-break => line will be broken at a soft wrap opportunities (in the absence of hyphenation, it occurs at word boundaries: white space and around punctuation) break-all : allow word break within word => apply word break at the exact place where the text would overflow its container |
AbstractTextPrimitive()
A text primitive is an object that can be rendered by all kinds of renderers and it aims at displaying a text.