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

Merge pull request #18726 from calixteman/issue18058

Consume any pending path before drawing an annotation
This commit is contained in:
calixteman 2024-09-10 19:00:58 +02:00 committed by GitHub
commit 0ac7f294cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 1 deletions

View file

@ -2701,9 +2701,12 @@ class CanvasGraphics {
} else {
resetCtxToDefault(this.ctx);
// Consume a potential path before clipping.
this.endPath();
this.ctx.rect(rect[0], rect[1], width, height);
this.ctx.clip();
this.endPath();
this.ctx.beginPath();
}
}