import StyledTextElement from '@mobilizing/library/js/Mobilizing/text/StyledTextElement.js'
StyledTextElement
StyledTextElement is a simple class to organise text elements extacted from HTML text. It contains an array of StyledLetter.
Constructor Summary
Public Constructor | ||
public | constructor(params: Object) |
Member Summary
Method Summary
Public Methods | ||
public | Defines the letter's color | |
public | Defines the letter's font | |
public | setPath(path: Path) Defines the letter's path | |
public | Defines the letter's font size | |
public | Defines the letter's text string | |
public | Defines the letter's x | |
public | Defines the letter's y | |
public | update() Updates properties according to the new settings (including styledLetters array properties) |
Public Members
public boundingBox: * source
public color: * source
public font: * source
public path: * source
public size: * source
public styledLetters: *[] source
public text: * source
Public Methods
public setColor(color: Color) source
Defines the letter's color
Params:
Name | Type | Attribute | Description |
color | Color |
public setFont(font: Font) source
Defines the letter's font
Params:
Name | Type | Attribute | Description |
font | Font |
public setPath(path: Path) source
Defines the letter's path
Params:
Name | Type | Attribute | Description |
path | Path | openType.js object's Path |
public setSize(size: Font) source
Defines the letter's font size
Params:
Name | Type | Attribute | Description |
size | Font |
public setText(text: String) source
Defines the letter's text string
Params:
Name | Type | Attribute | Description |
text | String |
public update() source
Updates properties according to the new settings (including styledLetters array properties)