tencent cloud

Tencent Cloud Super App as a Service

Rendering

PDF
Focus Mode
Font Size
Last updated: 2025-02-24 17:10:37

Canvas

In mini games, there is only one on-screen canvas, but you can have multiple off-screen canvases. You can create a canvas object using wx.createCanvas .
Note
The first call to this API creates the on-screen canvas, while subsequent calls create off-screen canvases.

Drawing context and APIs

You can create a drawing context using Canvas.getContext. The specific type of drawing context returned can be found in the RenderingContext.

Frame rate locking

wx.setPreferredFramesPerSecond allows you to lock the frame rate.



Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback