-
Notifications
You must be signed in to change notification settings - Fork 0
0G Drawing text to the canvas
Luis Murillo Baltodano edited this page Aug 30, 2020
·
5 revisions
txt {
x Number // canvas x coord
y Number // canvas y coord
c CanvasColorString // foreground color
font CanvasRenderingContext2D.font // text style
text String // text to show
}
More about CanvasRenderingContext2D.font
render(myTextObject).text()
const myTextObject= {
x: 73,
y: 42,
font: '10px monospace',
color: '#44f',
text: 'Hello, Canvas Preset'
}
preset(({size, render}) => {
size()
render(myTextObject).text()
}, '#canvasForText')