use canvas to generate pictures in Mini Program. There are layouts such as text in the pictures, which are similar to the QR code pictures in Alipay. Does Mini Program have a similar library?
use canvas to generate pictures in Mini Program. There are layouts such as text in the pictures, which are similar to the QR code pictures in Alipay. Does Mini Program have a similar library?
has carried out a similar project. At present, after the dom operation (poster making), write it to canvas, and finally generate an image
do you want to achieve the screenshot function in Mini Program?
text you can wrap the text according to the width of the device and the measureText of the canvas.
at the same time, you can calculate the dynamic height of the text
let ctx = wx.createCanvasContext ("myCanvas")
draw text
draw ctx.drawImage
draw () draw
wx.canvasToTempFilePath generate picture address
wx.previewImage preview picture with scan function
The problem is that canvas users draw graphics when they touchstart touchmove. Because I call the drawing method in touchmove, now there will be a little stutter when I come across a phone with poor performance. Is there any good solution? What I m thi...
my problem has been solved. Sharing my problems by asking questions here may be of some help to you! scene description I want to dynamically generate a picture (including user profile picture and mini program code) with canvas on my page, then let ...