TextCollection

class Markup.Shapes.TextCollection()

This is a base class for text markup objects. It should not be created directly.


Methods

addString

TextCollection.addString(text, position)
Arguments
  • text (string()) – the text to render

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

Adds a string to the collection

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

Returns

the fill color

Return type

Color

getFillOpacity

TextCollection.getFillOpacity()

Gets the fill opacity for this shape

Returns

the fill opacity

Return type

number

getFontFamily

TextCollection.getFontFamily()

Gets the font family for this text

Returns

the font family

Return type

null | string

getFontSize

TextCollection.getFontSize()

Gets the font size for this text

Returns

the font size

Return type

number

getStrings

TextCollection.getStrings()

Gets the strings in the collection

Return type

[_MarkupTextData]

getStrokeColor

TextCollection.getStrokeColor()

Gets the stroke color for this shape

Returns

the stroke color

Return type

Color

getStrokeWidth

TextCollection.getStrokeWidth()

Gets the stroke width for this shape in pixels

Returns

the stroke width in pixels

Return type

number

setFillColor

TextCollection.setFillColor(color)
Arguments
  • color (Color()) – the fill color

Sets the fill color for this shape

Return type

void

setFillOpacity

TextCollection.setFillOpacity(fillOpacity)
Arguments
  • fillOpacity (number()) – the fill opacity

Sets the fill opacity for this shape

Return type

void

setFontFamily

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

Sets the font family this shape

Return type

void

setFontSize

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

Sets the font size for this text

Return type

void

setStrokeColor

TextCollection.setStrokeColor(color)
Arguments
  • color (Color()) – the stroke color

Sets the stroke color for this shape

Return type

void

setStrokeWidth

TextCollection.setStrokeWidth(strokeWidth)
Arguments
  • strokeWidth (number()) – the stroke width in pixels

Sets the stroke width for this shape in pixels

Return type

void