Draw a long picture in the canvas of WeChat Mini Programs

set the canvas size to 750rpx and 1340rpx; you want to set the background image with a picture drawImage. But the start position in canvas is 0, but I don"t know what to do when setting the end position. Ask God for an answer. Thank you

Mar.16,2021

you can use wx.chooseImage (OBJECT) to get the length and width of the picture, and then set it to the parameters when drawing.

Menu