Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat small program API drawing and drawing canvas drawCanvas (not recommended)


May 19, 2021 WeChat Mini Program Development Document


Table of contents


WeChat small program API drawing and drawing canvas drawCanvas (not recommended) Drawing interfaces and methods


drawCanvas (not recommended)


Defined

Use the provided actions to plot on the canvas corresponding to the canvas-id given.

Parameters

Parameters Type Description
canvasId String Canvas logo, incoming <canvas/> cavas-id
actions Array An array of drawing actions, created by wx.createContext, that calls the getActions method to export an array of drawing actions.
reserve Boolean (optional) whether this draw is followed by the last draw, that is, the reserve parameter is false, the native layer should empty the canvas before drawing this call draw, if the reserver parameter is true, then retain the content on the current canvas, this call drew the content over the top, the default false

WeChat small program API drawing and drawing canvas drawCanvas (not recommended) Drawing interfaces and methods