mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-12 10:21:00 +00:00
Merge pull request #1796 from asturur/Shadow-scaling
Support Shadow scaling for CanvasZoom and ScaleFactor
This commit is contained in:
commit
1d7cfefba1
1 changed files with 5 additions and 3 deletions
|
|
@ -1061,10 +1061,12 @@
|
|||
return;
|
||||
}
|
||||
|
||||
var mult = this.canvas._currentMultiplier || 1;
|
||||
|
||||
ctx.shadowColor = this.shadow.color;
|
||||
ctx.shadowBlur = this.shadow.blur;
|
||||
ctx.shadowOffsetX = this.shadow.offsetX;
|
||||
ctx.shadowOffsetY = this.shadow.offsetY;
|
||||
ctx.shadowBlur = this.shadow.blur * mult * (this.scaleX + this.scaleY) / 2;
|
||||
ctx.shadowOffsetX = this.shadow.offsetX * mult * this.scaleX;
|
||||
ctx.shadowOffsetY = this.shadow.offsetY * mult * this.scaleY;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue