TextCollection

class Communicator.Markup.Shape.TextCollection()

Methods

addString

TextCollection.addString(text, position)

Adds a string to the collection

Arguments
  • text (string()) – the text to render

  • position (Point2()) – the top left position of the text

Return type

void

clear

TextCollection.clear()

Removes all text strings from this collection

Return type

void

getFillColor

TextCollection.getFillColor()

Gets the fill color for this shape

Return type

Color()

Returns

the fill color

getFillOpacity

TextCollection.getFillOpacity()

Gets the fill opacity for this shape

Return type

number

Returns

the fill opacity

getFontFamily

TextCollection.getFontFamily()

Gets the font family for this text

Return type

string | null

Returns

the font family

getFontSize

TextCollection.getFontSize()

Gets the font size for this text

Return type

number

Returns

the font size

getStrings

TextCollection.getStrings()

Gets the strings in the collection

Return type

[_MarkupTextData]

getStrokeColor

TextCollection.getStrokeColor()

Gets the stroke color for this shape

Return type

Color()

Returns

the stroke color

getStrokeWidth

TextCollection.getStrokeWidth()

Gets the stroke width for this shape in pixels

Return type

Pixels

Returns

the stroke width in pixels

setFillColor

TextCollection.setFillColor(color)

Sets the fill color for this shape

Arguments
  • color (Color()) – the fill color

Return type

void

setFillOpacity

TextCollection.setFillOpacity(fillOpacity)

Sets the fill opacity for this shape

Arguments
  • fillOpacity (number()) – the fill opacity

Return type

void

setFontFamily

TextCollection.setFontFamily(fontFamily)

Sets the font family this shape

Arguments
  • fontFamily (string()) – font family to use for this text

Return type

void

setFontSize

TextCollection.setFontSize(fontSize)

Sets the font size for this text

Arguments
  • fontSize (number()) – size to use for this text

Return type

void

setStrokeColor

TextCollection.setStrokeColor(color)

Sets the stroke color for this shape

Arguments
  • color (Color()) – the stroke color

Return type

void

setStrokeWidth

TextCollection.setStrokeWidth(strokeWidth)

Sets the stroke width for this shape in pixels

Arguments
  • strokeWidth (Pixels) – the stroke width in pixels

Return type

void