From 6d3034d4f99c458e657e567ce3a9a7574f359283 Mon Sep 17 00:00:00 2001 From: calixteman Date: Sun, 12 Apr 2026 13:08:40 +0200 Subject: [PATCH] Remove pattern fill when setting fill color before drawing a tile It fixes #21089. --- src/display/pattern_helper.js | 1 + test/pdfs/issue21089.pdf.link | 1 + test/test_manifest.json | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 test/pdfs/issue21089.pdf.link diff --git a/src/display/pattern_helper.js b/src/display/pattern_helper.js index 46ea8026f..bfe175574 100644 --- a/src/display/pattern_helper.js +++ b/src/display/pattern_helper.js @@ -920,6 +920,7 @@ class TilingPattern { setFillAndStrokeStyleToContext(graphics, paintType, color) { const context = graphics.ctx, current = graphics.current; + current.patternFill = current.patternStroke = false; switch (paintType) { case PaintType.COLORED: const { fillStyle, strokeStyle } = this.ctx; diff --git a/test/pdfs/issue21089.pdf.link b/test/pdfs/issue21089.pdf.link new file mode 100644 index 000000000..0ffdc8738 --- /dev/null +++ b/test/pdfs/issue21089.pdf.link @@ -0,0 +1 @@ +https://github.com/user-attachments/files/26655885/stepped.pdf diff --git a/test/test_manifest.json b/test/test_manifest.json index 711f9ab49..d7d1cf08c 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -14097,5 +14097,13 @@ "value": "123" } } + }, + { + "id": "issue21089", + "file": "pdfs/issue21089.pdf", + "md5": "0ae3954d2f24151dfc36ef717c8afbde", + "link": true, + "rounds": 1, + "type": "eq" } ]