CanvasContext.fillText
Fill the text in the canvas.
Parameters
It is Object type.
Field | Type | Description |
text | String | Text |
x | Number | The x coordinate of left-bottom corner of text |
y | Number | The y coordinate of left-bottom corner of text |
Sample Code
copy
//.js
const ctx = my.createCanvasContext('awesomeCanvas')
ctx.setFontSize(42)
ctx.fillText('Hello', 30, 30)
ctx.fillText('alipay', 200, 200)
ctx.draw()