mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
fix: using save and restore
This commit is contained in:
parent
b6dc446f7d
commit
6879fdc8fc
@ -610,9 +610,10 @@ export class CanvasRenderer extends Renderer {
|
||||
});
|
||||
const scaledOffsetX = x / scaleX;
|
||||
const scaledOffsetY = y / scaleY;
|
||||
this.ctx.save();
|
||||
this.ctx.scale(scaleX, scaleY);
|
||||
this.renderRepeat(scaledPath, pattern, scaledOffsetX, scaledOffsetY);
|
||||
this.ctx.scale(1 / scaleX, 1 / scaleY);
|
||||
this.ctx.restore();
|
||||
}
|
||||
} else if (isLinearGradient(backgroundImage)) {
|
||||
const [path, x, y, width, height] = calculateBackgroundRendering(container, index, [null, null, null]);
|
||||
|
Loading…
Reference in New Issue
Block a user