小程序畫布離屏 canvas 實(shí)例OffscreenCanvas
OffscreenCanvas
離屏 canvas 實(shí)例,可通過(guò) wx.createOffscreenCanvas 創(chuàng)建。
屬性
number width
畫布寬度
number height
畫布高度
方法
RenderingContext OffscreenCanvas.getContext(string contextType)
該方法返回 OffscreenCanvas 的繪圖上下文
Image OffscreenCanvas.createImage()
創(chuàng)建一個(gè)圖片對(duì)象。支持在 2D Canvas 和 WebGL Canvas 下使用, 但不支持混用 2D 和 WebGL 的方法。
作者:大學(xué)生新聞網(wǎng) 來(lái)源:大學(xué)生新聞網(wǎng)
發(fā)布時(shí)間:2025-04-17 閱讀:
- 小程序畫布顏色Color
- 顏色。可以用以下幾種方式來(lái)表示 canvas 中使用的顏色:
- 04-17 關(guān)注:3