gretro-text
Gretro-text is a gretro plugin to draw a text.
Installation
browser
include gretro-text.js after including gretro.js
node.js
gretro-text
is available on npm.
$ npm install gretro-text
var gretro = ;var gretroText = ; gretro;
API Reference
char
Draws a 5x7 character to the canvas.
Syntax
canvas;
Parameters
- ch: int
- ascii code (0x21 <= ch <= 0x7e)
- x: int
- x-coordinate of the character
- y: int
- y-coordinate of the character
Returns
Canvas: self for method chaining
text
Draws a text to the canvas.
Syntax
canvastexttext x y;
Parameters
- text: string
- x: int
- x-coordinate of the text
- y: int
- y-coordinate of the text
Returns
Canvas: self for method chaining