Merge pull request #11401 from mike-000/patch-10

Ensure image extent is valid when scale is negative
This commit is contained in:
Andreas Hocevar
2020-08-08 21:15:10 +02:00
committed by GitHub
4 changed files with 33 additions and 11 deletions

View File

@@ -409,7 +409,13 @@ class Executor {
tmpExtent
);
} else {
createOrUpdate(boxX, boxY, boxX + boxW, boxY + boxH, tmpExtent);
createOrUpdate(
Math.min(boxX, boxX + boxW),
Math.min(boxY, boxY + boxH),
Math.max(boxX, boxX + boxW),
Math.max(boxY, boxY + boxH),
tmpExtent
);
}
let renderBufferX = 0;
let renderBufferY = 0;