Text
- class Markup.Shapes.Text()
This object represents markup text that is drawn on the canvas.
Constructors
Methods
Constructors
Methods
getFillColor
- Text.getFillColor()
Gets the fill color for this shape
- Returns
the fill color
- Return type
Color
getFillOpacity
- Text.getFillOpacity()
Gets the fill opacity for this shape
- Returns
the fill opacity
- Return type
number
getFontFamily
- Text.getFontFamily()
Gets the font family for this text
- Returns
the font family
- Return type
null | string
getFontSize
- Text.getFontSize()
Gets the font size for this text
- Returns
the font size
- Return type
number
getPosition
- Text.getPosition()
Gets the text position
- Returns
the text position
- Return type
Point2
getStrokeColor
- Text.getStrokeColor()
Gets the stroke color for this shape
- Returns
the stroke color
- Return type
Color
getStrokeWidth
- Text.getStrokeWidth()
Gets the stroke width for this shape in pixels
- Returns
the stroke width in pixels
- Return type
number
getText
- Text.getText()
Gets the text content
- Returns
the text content
- Return type
string
setFillColor
setFillOpacity
- Text.setFillOpacity(fillOpacity)
- Arguments
fillOpacity (
number()
) – the fill opacity
Sets the fill opacity for this shape
- Return type
void
setFontFamily
- Text.setFontFamily(fontFamily)
- Arguments
fontFamily (
string()
) – font family to use for this text
Sets the font family this shape
- Return type
void
setFontSize
- Text.setFontSize(fontSize)
- Arguments
fontSize (
number()
) – size to use for this text
Sets the font size for this text
- Return type
void
setPosition
setStrokeColor
setStrokeWidth
- Text.setStrokeWidth(strokeWidth)
- Arguments
strokeWidth (
number()
) – the stroke width in pixels
Sets the stroke width for this shape in pixels
- Return type
void
setText
- Text.setText(text)
- Arguments
text (
string()
) – the text to render
Sets the text content
- Return type
void