小程序畫布離屏 canvas 實例OffscreenCanvas
OffscreenCanvas
離屏 canvas 實例,可通過 wx.createOffscreenCanvas 創建。
屬性
number width
畫布寬度
number height
畫布高度
方法
RenderingContext OffscreenCanvas.getContext(string contextType)
該方法返回 OffscreenCanvas 的繪圖上下文
Image OffscreenCanvas.createImage()
創建一個圖片對象。支持在 2D Canvas 和 WebGL Canvas 下使用, 但不支持混用 2D 和 WebGL 的方法。
計算機學習推薦