mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-06 23:41:00 +00:00
Update object.class.js
This commit is contained in:
parent
e284fc0ec3
commit
2415eec00d
1 changed files with 7 additions and 7 deletions
|
|
@ -1003,7 +1003,7 @@
|
|||
ctx.lineJoin = this.strokeLineJoin;
|
||||
ctx.miterLimit = this.strokeMiterLimit;
|
||||
ctx.strokeStyle = this.stroke.toLive
|
||||
? this.stroke.toLive(ctx)
|
||||
? this.stroke.toLive(ctx, this)
|
||||
: this.stroke;
|
||||
}
|
||||
},
|
||||
|
|
@ -1011,7 +1011,7 @@
|
|||
_setFillStyles: function(ctx) {
|
||||
if (this.fill) {
|
||||
ctx.fillStyle = this.fill.toLive
|
||||
? this.fill.toLive(ctx)
|
||||
? this.fill.toLive(ctx, this)
|
||||
: this.fill;
|
||||
}
|
||||
},
|
||||
|
|
@ -1083,15 +1083,15 @@
|
|||
}
|
||||
|
||||
ctx.save();
|
||||
if (this.fill.toLive) {
|
||||
ctx.translate(
|
||||
-this.width / 2 + this.fill.offsetX || 0,
|
||||
-this.height / 2 + this.fill.offsetY || 0);
|
||||
}
|
||||
if (this.fill.gradientTransform) {
|
||||
var g = this.fill.gradientTransform;
|
||||
ctx.transform.apply(ctx, g);
|
||||
}
|
||||
if (this.fill.toLive) {
|
||||
ctx.translate(
|
||||
-this.width / 2 + this.fill.offsetX || 0,
|
||||
-this.height / 2 + this.fill.offsetY || 0);
|
||||
}
|
||||
if (this.fillRule === 'destination-over') {
|
||||
ctx.fill('evenodd');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue