mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 07:08:08 +02:00
Merge pull request #13498 from Snuffleupagus/issue-12996
Normalize the coordinates used in `SVGGraphics._makeTilingPattern` (issue 12996)
This commit is contained in:
commit
7d834396e4
1 changed files with 4 additions and 2 deletions
|
@ -1113,8 +1113,10 @@ if (
|
|||
const paintType = args[7];
|
||||
|
||||
const tilingId = `shading${shadingCount++}`;
|
||||
const [tx0, ty0] = Util.applyTransform([x0, y0], matrix);
|
||||
const [tx1, ty1] = Util.applyTransform([x1, y1], matrix);
|
||||
const [tx0, ty0, tx1, ty1] = Util.normalizeRect([
|
||||
...Util.applyTransform([x0, y0], matrix),
|
||||
...Util.applyTransform([x1, y1], matrix),
|
||||
]);
|
||||
const [xscale, yscale] = Util.singularValueDecompose2dScale(matrix);
|
||||
const txstep = xstep * xscale;
|
||||
const tystep = ystep * yscale;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue