# CanvasContext.moveTo(number x, number and)

with Promise style call: Not supported

Mini Program plugin: Support

Moves the path to the specified point on the canvas without creating a line. use stroke Method to draw lines

# parameter

# number x

Target position x coordinate

# number and

Target position and coordinate

# sample code

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()