tencent cloud

OffscreenCanvas
最后更新时间:2025-05-16 17:44:18
OffscreenCanvas
最后更新时间: 2025-05-16 17:44:18
Function Description: Offscreen canvas instances can be created through wx.createOffscreenCanvas.

Attribute

Attributes
Types
Note
width
number
Canvas Width
height
number
Canvas Height

Method Set

createImage

The method is utilized as Image OffscreenCanvas.createImage()
Function Description: This creates an image object. It is compatible with 2D Canvas.
Return Value: Image. Please note that it is advisable to create image objects using the canvas's own createImage.

getContext

The method is utilized as RenderingContext OffscreenCanvas.getContext(string contextType)
Function Description: This method returns the drawing context of the OffscreenCanvas.
Parameters and Description: string contextType, the type of drawing context, which needs to be consistent with the type passed in when creating OffscreenCanvas.
Value
Note
2d
2D type

本页内容是否解决了您的问题?
您也可以 联系销售 提交工单 以寻求帮助。

文档反馈