AbstractTextPrimitive

AbstractTextPrimitive ⇐ AbstractPrimitive

Kind: global abstract class
Extends: AbstractPrimitive
Properties

NameTypeDescription
maxWidthnumber

The maximum width of the primitive (in pixels) when defined in auto width mode

textString

The text content

colorString

The text color represented by a #RRGGBB hexadecimal notation

sizenumber

The size of text (in pixels)

familyString

The family of text

lineHeightnumber

The line height (in pixels)

overflowboolean

The overflow which is set to true otherwise false will allow to draw outside the view

typeString

The type of primitive (text, rectangle, image)

alignString

The text alignment (left, right, center)

textTransformString

The text capitalization (uppercase, lowercase)

ellipsisboolean

Flag to enable ellipsis if the text overflows

maxLinesnumber

The maximum number of lines to display (Ignored if width property is not set)

letterSpacingnumber

Value added to the natural spacing between characters while rendering the text (in pixels)

wordBreakString

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.