Constructor
new Text(x, y, color, text, fontopt)
Creates a new text object.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
x | number | The x-coordinate. | ||
y | number | The y-coordinate. | ||
color | string | The text color. | ||
text | string | The string content. | ||
font | string | <optional> | "20px monospace" | The font style. |
Extends
Members
hidden :boolean
Type:
- boolean
- Overrides:
- Source:
Methods
draw()
Draws the text on the canvas.
- Overrides:
- Source: