From 70c200174108154fb2659617fbffee6e71c10f81 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 8 Jan 2025 13:23:43 +0100 Subject: [PATCH] Access the bbox/background data correctly in the `MeshShadingPattern` class (issue 18816) This appears to have regressed in PR 13808, since it removed the `matrix`-entry from array returned by the `MeshShading.prototype.getIR` method *without* also updating the indexes in the `MeshShadingPattern` constructor. --- src/display/pattern_helper.js | 4 ++-- test/pdfs/.gitignore | 1 + test/pdfs/issue18816.pdf | Bin 0 -> 3472 bytes test/test_manifest.json | 7 +++++++ 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 test/pdfs/issue18816.pdf diff --git a/src/display/pattern_helper.js b/src/display/pattern_helper.js index 4241695a23aa1..077ec990be87f 100644 --- a/src/display/pattern_helper.js +++ b/src/display/pattern_helper.js @@ -313,8 +313,8 @@ class MeshShadingPattern extends BaseShadingPattern { this._colors = IR[3]; this._figures = IR[4]; this._bounds = IR[5]; - this._bbox = IR[7]; - this._background = IR[8]; + this._bbox = IR[6]; + this._background = IR[7]; this.matrix = null; } diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index b9b4efbd2fc69..7b9182629a57d 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -94,6 +94,7 @@ !issue8424.pdf !issue8480.pdf !bug1650302_reduced.pdf +!issue18816.pdf !issue8570.pdf !issue8697.pdf !issue8702.pdf diff --git a/test/pdfs/issue18816.pdf b/test/pdfs/issue18816.pdf new file mode 100644 index 0000000000000000000000000000000000000000..79b1c75e5f264f3e372d0bee7fee1e670173d43b GIT binary patch literal 3472 zcmdT`Yitx%6z)T6847}w+Mo%S(3V#0&U0T-mUd^m(6q?1ZAk4F<8=3SJ9Rs=%+5l~ z4+sJU6H<{!Kqw-`Xst-VK;q+%mhkw2fhGnYG2sz3Xb6Txjhc{p?(A;64=NH#jGK05 z?z!jQbMAM}J?AU+xZIVjNuWy4-+pa?ViAMXwoa<5ilUo(!Whw_q)Q<+N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hm@#mu{uVdB~3R1#525|DlM&D H;imoqFi+U$ literal 0 HcmV?d00001 diff --git a/test/test_manifest.json b/test/test_manifest.json index 1a274fb5b7511..e50d5cadf5471 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -10078,6 +10078,13 @@ "annotations": true, "type": "eq" }, + { + "id": "issue18816", + "file": "pdfs/issue18816.pdf", + "md5": "45f863f5b227f700ffea1210e4f80403", + "rounds": 1, + "type": "eq" + }, { "id": "issue17794", "file": "pdfs/issue17794.pdf",