Text

class Markup.Shapes.Text()

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

Constructors

Markup.Shapes.Text.constructor()
Text(text: string, position: Point2): Text

Creates a new markup text item.

Parameters

text: string

the text associated with this item.

position: Point2

the screen space point of the top left of the text string.

Returns: Text

Methods

Markup.Shapes.Text.getFillColor()

inherited

getFillColor(): Color

Gets the fill color for this shape

Returns: Color

the fill color
Markup.Shapes.Text.getFillOpacity()

inherited

getFillOpacity(): number

Gets the fill opacity for this shape

Returns: number

the fill opacity
Markup.Shapes.Text.getFontFamily()

inherited

getFontFamily(): (None | string)

Gets the font family for this text

Returns: (None | string)

the font family
Markup.Shapes.Text.getFontSize()

inherited

getFontSize(): number

Gets the font size for this text

Returns: number

the font size
Markup.Shapes.Text.getPosition()
getPosition(): Point2

Gets the text position

Returns: Point2

the text position
Markup.Shapes.Text.getStrokeColor()

inherited

getStrokeColor(): Color

Gets the stroke color for this shape

Returns: Color

the stroke color
Markup.Shapes.Text.getStrokeWidth()

inherited

getStrokeWidth(): number

Gets the stroke width for this shape in pixels

Returns: number

the stroke width in pixels
Markup.Shapes.Text.getText()
getText(): string

Gets the text content

Returns: string

the text content
Markup.Shapes.Text.setFillColor()

inherited

setFillColor(color: Color): void

Sets the fill color for this shape

Parameters

color: Color

the fill color

Returns: void

Markup.Shapes.Text.setFillOpacity()

inherited

setFillOpacity(fillOpacity: number): void

Sets the fill opacity for this shape

Parameters

fillOpacity: number

the fill opacity

Returns: void

Markup.Shapes.Text.setFontFamily()

inherited

setFontFamily(fontFamily: string): void

Sets the font family this shape

Parameters

fontFamily: string

font family to use for this text

Returns: void

Markup.Shapes.Text.setFontSize()

inherited

setFontSize(fontSize: number): void

Sets the font size for this text

Parameters

fontSize: number

size to use for this text

Returns: void

Markup.Shapes.Text.setPosition()
setPosition(position: Point2): void

Sets the text position

Parameters

position: Point2

Returns: void

the top left position to render text from
Markup.Shapes.Text.setStrokeColor()

inherited

setStrokeColor(color: Color): void

Sets the stroke color for this shape

Parameters

color: Color

the stroke color

Returns: void

Markup.Shapes.Text.setStrokeWidth()

inherited

setStrokeWidth(strokeWidth: number): void

Sets the stroke width for this shape in pixels

Parameters

strokeWidth: number

the stroke width in pixels

Returns: void

Markup.Shapes.Text.setText()
setText(text: string): void

Sets the text content

Parameters

text: string

the text to render

Returns: void