Documentation de développement de l'applet WeChat
/ 微信小程序API 繪圖setShadow(設置陰影樣式)
微信小程序API 繪圖setShadow(設置陰影樣式)
setShadow
定義
設置陰影樣式。
Tip: 如果沒有設置,offsetX 默認值為0, offsetY 默認值為0, blur 默認值為0,color 默認值為 black
。
參數(shù)
例子
const ctx = wx.createCanvasContext('myCanvas') ctx.setFillStyle('red') ctx.setShadow(10, 50, 50, 'blue') ctx.fillRect(10, 10, 150, 75) ctx.draw()