May 19, 2021 WeChat Mini Program Development Document
Drawing interfaces and methods
Move the path to a specified point in the canvas without creating lines.
Tip:
Draw
stroke()
method
Parameters | Type | Description |
---|---|---|
Ⅹ | Number | The x coordinates of the target location |
Y | Number | The y coordinates of the target location |
const ctx = wx.createCanvasContext('myCanvas')
ctx.moveTo(10, 10)
ctx.lineTo(100, 10)
ctx.moveTo(10, 50)
ctx.lineTo(100, 50)
ctx.stroke()
ctx.draw()