mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-04 20:04:45 +00:00
Add support for "evenodd" fill rule. Closes #1021
This commit is contained in:
parent
c53089a60a
commit
f3b7884827
5 changed files with 22 additions and 7 deletions
7
dist/fabric.js
vendored
7
dist/fabric.js
vendored
|
|
@ -10823,7 +10823,12 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
|
|||
-this.width / 2 + this.fill.offsetX || 0,
|
||||
-this.height / 2 + this.fill.offsetY || 0);
|
||||
}
|
||||
ctx.fill();
|
||||
if (this.fillRule === 'destination-over') {
|
||||
ctx.fill('evenodd');
|
||||
}
|
||||
else {
|
||||
ctx.fill();
|
||||
}
|
||||
if (this.fill.toLive) {
|
||||
ctx.restore();
|
||||
}
|
||||
|
|
|
|||
8
dist/fabric.min.js
vendored
8
dist/fabric.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/fabric.min.js.gz
vendored
BIN
dist/fabric.min.js.gz
vendored
Binary file not shown.
7
dist/fabric.require.js
vendored
7
dist/fabric.require.js
vendored
|
|
@ -10823,7 +10823,12 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
|
|||
-this.width / 2 + this.fill.offsetX || 0,
|
||||
-this.height / 2 + this.fill.offsetY || 0);
|
||||
}
|
||||
ctx.fill();
|
||||
if (this.fillRule === 'destination-over') {
|
||||
ctx.fill('evenodd');
|
||||
}
|
||||
else {
|
||||
ctx.fill();
|
||||
}
|
||||
if (this.fill.toLive) {
|
||||
ctx.restore();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1027,7 +1027,12 @@
|
|||
-this.width / 2 + this.fill.offsetX || 0,
|
||||
-this.height / 2 + this.fill.offsetY || 0);
|
||||
}
|
||||
ctx.fill();
|
||||
if (this.fillRule === 'destination-over') {
|
||||
ctx.fill('evenodd');
|
||||
}
|
||||
else {
|
||||
ctx.fill();
|
||||
}
|
||||
if (this.fill.toLive) {
|
||||
ctx.restore();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue