Merge pull request #15688 from Snuffleupagus/bug-1799927-mask

Take the mask-offset into account when rendering repeated image masks (bug 1799927)
This commit is contained in:
Jonas Jenwald 2022-11-14 14:49:06 +01:00 committed by GitHub
commit 82795a3b81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2902,7 +2902,14 @@ class CanvasGraphics {
ctx.transform(scaleX, skewX, skewY, scaleY, 0, 0);
const mask = this._createMaskCanvas(img);
ctx.setTransform(1, 0, 0, 1, 0, 0);
ctx.setTransform(
1,
0,
0,
1,
mask.offsetX - currentTransform[4],
mask.offsetY - currentTransform[5]
);
for (let i = 0, ii = positions.length; i < ii; i += 2) {
const trans = Util.transform(currentTransform, [
scaleX,