API Documentation

for 0.0.1
Show:

StyledTextElement Class

StyledTextElement is a simple class to organise text elements extacted from HTML text. It contains an array of StyledLetter.

Constructor

StyledTextElement

(
  • params
)

Parameters:

  • params Object

    Parameters Object

    • text String

      the text string (character)

    • size Number

      the size of the font

    • font Font

      a Mobilizing font reference

    • color Color

      a Mobilizing Color

Methods

setColor

(
  • color
)

Defines the letter's color

Parameters:

setFont

(
  • font
)

Defines the letter's font

Parameters:

setPath

(
  • openType.js
)

Defines the letter's path

Parameters:

  • openType.js Path

    object's Path

setSize

(
  • size
)

Defines the letter's font size

Parameters:

setText

(
  • text
)

Defines the letter's text string

Parameters:

  • text String

setX

(
  • x
)

Defines the letter's x

Parameters:

  • x Number

setY

(
  • y
)

Defines the letter's y

Parameters:

  • y Number

update

()

Updates properties according to the new settings (including styledLetters array properties)