CanvasContext.moveTo
Move the path to the specified point, the line will not be created. stroke()
can be used to draw the line.
Parameters
It is Object type.
Property | Type | Description |
x | Number | The x coordinate of the destination point. |
y | Number | The y coordinate of the destination point. |
Sample Code
copy
//.js
const ctx = my.createCanvasContext('awesomeCanvas')
ctx.moveTo(10, 10)
ctx.lineTo(100, 10)
ctx.moveTo(10, 50)
ctx.lineTo(100, 50)
ctx.stroke()
ctx.draw()