constructor(text, [font], [stroke], [background], [opacity], [x], [y])
Class: Text.
Description:
Constructor of Text shape. Color, Gradient, or background image are specified in "background" argument, because it's a Shape.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
|
|
string |
Text to be drawn as shape |
|
|
|
Font object, such as {size: 13, name: "sans-serif", ...}. |
||
|
|
null |
Stroke object. |
|
|
|
string |
"#000000" |
Background string, CSS style. See Shape > background for details. |
|
|
number |
1 |
Opacity of the shape. Valid value is a decimal between 0 - 1. |
|
|
number |
0 |
X position of top-left corner of text |
|
|
number |
0 |
Y position of top-left corner of text |
