WeChat Open Platform

Mini Programs Documentation


Uses the actions provided to draw on the canvas corresponding to the canvas-id given.


Parameter Type Description
canvasId String Canvas ID, the canvas-id imported into <canvas/>
actions Array Drawing actions array, context created by wx.createContext, call the getActions method to export the drawing actions array
reserve Boolean (Optional) Whether this rendering follows the previous one. That is, if the reserve parameter is false, the native layer should first clear the canvas before calling drawCanvas to draw this time, then continue to draw. If the reserve parameter is true, the content on the current canvas is retained. The content drawn by calling drawCanvas this time overwrites it. The default is false.