# CanvasContext.setGlobalAlpha(number alpha)
From base library 1.9.90 Start, this interface stops maintenance, please use CanvasContext.globalAlpha replace
with Promise style call: Not supported
Mini Program plugin: Support
Sets global brush transparency.
# parameter
# number alpha
Transparency. range 0-1,0 For complete transparency, 1 Indicates complete opacity.
# sample code
const ctx = wx.createCanvasContext('myCanvas')
ctx.setFillStyle('red')
ctx.fillRect(10, 10, 150, 100)
ctx.setGlobalAlpha(0.2)
ctx.setFillStyle('blue')
ctx.fillRect(50, 50, 150, 100)
ctx.setFillStyle('yellow')
ctx.fillRect(100, 100, 150, 100)
ctx.draw()