canvas 中 setStrokeStyle 会影响 setShadow

发布于 8 年前作者 jiafang6662 次浏览最后编辑 8 年前来自 ask

在 canvas 中 setStrokeStyle 及 setFillStyle,如果使用了半透明颜色,会导致 setShadow 出来的阴影也跟着有半透明的。

比如说 如果 ctx.setStrokeStyle(‘rgba(0, 0, 0, 0)’),那么 ctx.setShadow(0, 0, 0, ‘black’) 是看不到任何东西的。

2 回复
nxiang
nxiang1 楼6 年前

请问是何种设备呢?

chenqiang
chenqiang2 楼6 年前

所有设备 包括模拟器里也是