Skip to content

Commit 2369e2d

Browse files
committed
Take into account the path and the line width when consuming a stroked path
1 parent 7c5695f commit 2369e2d

4 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/display/canvas.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,13 @@ class CanvasGraphics {
16641664
}
16651665
}
16661666
if (consumePath) {
1667-
this.consumePath(path, this.current.getClippedPathBoundingBox());
1667+
this.consumePath(
1668+
path,
1669+
this.current.getClippedPathBoundingBox(
1670+
PathType.STROKE,
1671+
getCurrentTransform(this.ctx)
1672+
)
1673+
);
16681674
}
16691675
// Restore the global alpha to the fill alpha
16701676
ctx.globalAlpha = this.current.fillAlpha;

test/pdfs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,3 +715,4 @@
715715
!red_stamp.pdf
716716
!issue19633.pdf
717717
!issue19424.pdf
718+
!issue18529.pdf

test/pdfs/issue18529.pdf

4.12 KB
Binary file not shown.

test/test_manifest.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12012,5 +12012,12 @@
1201212012
"firstPage": 1,
1201312013
"lastPage": 1,
1201412014
"type": "eq"
12015+
},
12016+
{
12017+
"id": "issue18529",
12018+
"file": "pdfs/issue18529.pdf",
12019+
"md5": "f95d2cbdd904f5acf922e088cc3cb153",
12020+
"rounds": 1,
12021+
"type": "eq"
1201512022
}
1201612023
]

0 commit comments

Comments
 (0)