微信小程序API 绘图setShadow(设置阴影样式)
由 ?﹏???ζ???﹏﹏? 创建,youj 最后一次修改 2016-12-24 绘图接口和方法canvasContext.setShadow定义设置阴影样式。Tip: 如果没有设置,offsetX 默认值为0, offsetY 默认值为0, blur 默认值为0,color 默认值为black。参数参数类型范围定义offsetXNumber 阴影相对于形状在水平方向的偏移offsetYNumber 阴影相对于形状在竖直方向的偏移blurNumber0~100阴影的模糊级别,数值越大越模糊colorColor 阴影的颜色例子const ctx = wx.createCanvasContext('myCanvas')ctx.setFillStyle('red')ctx.setShadow(10, 50, 50, 'blue')ctx.fillRect(10, 10, 150, 75)ctx.draw()绘图接口和方法
微信小程序API 绘图setShadow(设置阴影样式)