Merge pull request #21020 from calixteman/issue7821

Fix the annotation base transform before drawing it
This commit is contained in:
calixteman 2026-04-03 21:26:48 +02:00 committed by GitHub
commit 5347c22703
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 0 deletions

View File

@ -2858,8 +2858,10 @@ class CanvasGraphics {
this.ctx.canvas.height
);
this.baseTransformStack.push(this.baseTransform);
this.transform(opIdx, ...transform);
this.transform(opIdx, ...matrix);
this.baseTransform = getCurrentTransform(this.ctx);
}
endAnnotation(opIdx) {
@ -2871,6 +2873,7 @@ class CanvasGraphics {
delete this.annotationCanvas.savedCtx;
delete this.annotationCanvas;
}
this.baseTransform = this.baseTransformStack.pop();
}
paintImageMaskXObject(opIdx, img) {

View File

@ -897,3 +897,4 @@
!tiling_patterns_variations.pdf
!function_based_shading.pdf
!issue16091.pdf
!issue7821.pdf

BIN
test/pdfs/issue7821.pdf Executable file

Binary file not shown.

View File

@ -14059,5 +14059,12 @@
"md5": "ac6b2b69d9b3675b317708ec00aaf56c",
"rounds": 1,
"type": "eq"
},
{
"id": "issue7821",
"file": "pdfs/issue7821.pdf",
"md5": "7f0f390a70228fffe95835518ec266c5",
"rounds": 1,
"type": "eq"
}
]