1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Take into account the path and the line width when consuming a stroked path

This commit is contained in:
Calixte Denizet 2025-03-23 18:08:06 +01:00
parent 7c5695f5c6
commit 2369e2d84f
4 changed files with 232 additions and 1 deletions

View file

@ -1664,7 +1664,13 @@ class CanvasGraphics {
}
}
if (consumePath) {
this.consumePath(path, this.current.getClippedPathBoundingBox());
this.consumePath(
path,
this.current.getClippedPathBoundingBox(
PathType.STROKE,
getCurrentTransform(this.ctx)
)
);
}
// Restore the global alpha to the fill alpha
ctx.globalAlpha = this.current.fillAlpha;