0
我有一个半透明状:帆布阴影/发光效果在半透明形状上?
this.cx.beginPath();
this.cx.globalAlpha = .1;
this.cx.fillStyle = gradientFill;
this.cx.strokeStyle = gradientStroke;
this.cx.arc(150, 150, 139, 0, Math.PI * 2, true);
this.cx.lineWidth = 1;
this.cx.stroke();
this.cx.fill();
我想补充一点影子,但我希望它只是出现在形状外,我想更多的是光晕比阴影。有没有办法做到这一点在画布我尝试用:
this.cx.shadowColor = 'rgba(0, 0, 0, .75)';
this.cx.shadowBlur = 5;
this.cx.shadowOffsetX = 5;
this.cx.shadowOffsetY = -5;
看童话一般的暗影通过半透明状可见。
谢谢!