Text

class Communicator.Markup.Shape.Text()

This object represents markup text that is drawn on the canvas.

Constructors

constructor()

Creates a new markup text item.

Methods

getFillColor()

getFillOpacity()

getFontFamily()

getFontSize()

getPosition()

getStrokeColor()

getStrokeWidth()

getText()

setFillColor()

setFillOpacity()

setFontFamily()

setFontSize()

setPosition()

setStrokeColor()

setStrokeWidth()

setText()


Constructors

constructor

Communicator.Markup.Shape.Text.constructor(text, position)

Creates a new markup text item.

Arguments
  • text (string()) –

  • position (Communicator.Point2()) –

Return type

Communicator.Markup.Shape.Text

Methods

getFillColor

Communicator.Markup.Shape.Text.getFillColor()

Gets the fill color for this shape

Return type

Communicator.Color

Returns

the fill color

getFillOpacity

Communicator.Markup.Shape.Text.getFillOpacity()

Gets the fill opacity for this shape

Return type

number

Returns

the fill opacity

getFontFamily

Communicator.Markup.Shape.Text.getFontFamily()

Gets the font family for this text

Return type

{  }

Returns

the font family

getFontSize

Communicator.Markup.Shape.Text.getFontSize()

Gets the font size for this text

Return type

number

Returns

the font size

getPosition

Communicator.Markup.Shape.Text.getPosition()

Gets the text position

Return type

Communicator.Point2

Returns

the text position

getStrokeColor

Communicator.Markup.Shape.Text.getStrokeColor()

Gets the stroke color for this shape

Return type

Communicator.Color

Returns

the stroke color

getStrokeWidth

Communicator.Markup.Shape.Text.getStrokeWidth()

Gets the stroke width for this shape in pixels

Return type

Communicator.Pixels

Returns

the stroke width in pixels

getText

Communicator.Markup.Shape.Text.getText()

Gets the text content

Return type

string

Returns

the text content

setFillColor

Communicator.Markup.Shape.Text.setFillColor(color)

Sets the fill color for this shape

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

Return type

void

setFillOpacity

Communicator.Markup.Shape.Text.setFillOpacity(fillOpacity)

Sets the fill opacity for this shape

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

Return type

void

setFontFamily

Communicator.Markup.Shape.Text.setFontFamily(fontFamily)

Sets the font family this shape

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

Return type

void

setFontSize

Communicator.Markup.Shape.Text.setFontSize(fontSize)

Sets the font size for this text

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

Return type

void

setPosition

Communicator.Markup.Shape.Text.setPosition(position)

Sets the text position

Arguments
  • position (Communicator.Point2()) –

Return type

void

Returns

the top left position to render text from

setStrokeColor

Communicator.Markup.Shape.Text.setStrokeColor(color)

Sets the stroke color for this shape

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

Return type

void

setStrokeWidth

Communicator.Markup.Shape.Text.setStrokeWidth(strokeWidth)

Sets the stroke width for this shape in pixels

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

Return type

void

setText

Communicator.Markup.Shape.Text.setText(text)

Sets the text content

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

Return type

void