Text

class wv.Markup.Shapes.Text()

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

Constructors

wv.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

wv.Markup.Shapes.Text.getFillColor()

inherited

getFillColor(): Color

Gets the fill color for this shape

Returns: Color

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

inherited

getFillOpacity(): number

Gets the fill opacity for this shape

Returns: number

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

inherited

getFontFamily(): (None | string)

Gets the font family for this text

Returns: (None | string)

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

inherited

getFontSize(): number

Gets the font size for this text

Returns: number

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

Gets the text position

Returns: Point2

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

inherited

getStrokeColor(): Color

Gets the stroke color for this shape

Returns: Color

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

inherited

getStrokeWidth(): number

Gets the stroke width for this shape in pixels

Returns: number

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

Gets the text content

Returns: string

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

inherited

setFillColor(color: Color): void

Sets the fill color for this shape

Parameters

color: Color

the fill color

Returns: void

wv.Markup.Shapes.Text.setFillOpacity()

inherited

setFillOpacity(fillOpacity: number): void

Sets the fill opacity for this shape

Parameters

fillOpacity: number

the fill opacity

Returns: void

wv.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

wv.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

wv.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
wv.Markup.Shapes.Text.setStrokeColor()

inherited

setStrokeColor(color: Color): void

Sets the stroke color for this shape

Parameters

color: Color

the stroke color

Returns: void

wv.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

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

Sets the text content

Parameters

text: string

the text to render

Returns: void