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;
看童話一般的暗影通過半透明狀可見。
謝謝!