mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-03-16 22:10:32 +00:00
fix toDataurl and zoom change (#5278)
This commit is contained in:
parent
68a84a7da7
commit
fdd2d94e77
2 changed files with 7 additions and 9 deletions
|
|
@ -1077,7 +1077,7 @@
|
|||
if (!this._cacheCanvas) {
|
||||
this._createCacheCanvas();
|
||||
}
|
||||
if (this.isCacheDirty(false)) {
|
||||
if (this.isCacheDirty()) {
|
||||
this.statefullCache && this.saveState({ propertySet: 'cacheProperties' });
|
||||
this.drawObject(this._cacheContext, options.forClipping);
|
||||
this.dirty = false;
|
||||
|
|
|
|||
|
|
@ -931,13 +931,11 @@
|
|||
ctx.restore();
|
||||
}
|
||||
if (path) {
|
||||
if (path.isCacheDirty()) {
|
||||
// needed to setup a couple of variables
|
||||
path.shouldCache();
|
||||
path.canvas = this;
|
||||
path._transformDone = true;
|
||||
path.renderCache({ forClipping: true });
|
||||
}
|
||||
path.canvas = this;
|
||||
// needed to setup a couple of variables
|
||||
path.shouldCache();
|
||||
path._transformDone = true;
|
||||
path.renderCache({ forClipping: true });
|
||||
this.drawClipPathOnCanvas(ctx);
|
||||
}
|
||||
this._renderOverlay(ctx);
|
||||
|
|
@ -956,7 +954,7 @@
|
|||
ctx.save();
|
||||
ctx.transform(v[0], v[1], v[2], v[3], v[4], v[5]);
|
||||
// DEBUG: uncomment this line, comment the following
|
||||
// ctx.globalAlpha = 0.4
|
||||
// ctx.globalAlpha = 0.4;
|
||||
ctx.globalCompositeOperation = 'destination-in';
|
||||
path.transform(ctx);
|
||||
ctx.scale(1 / path.zoomX, 1 / path.zoomY);
|
||||
|
|
|
|||
Loading…
Reference in a new issue