[Pkg-javascript-commits] [pdf.js] 43/414: Ensure that the `baseTransform` is applied when rendering annotations

David Prévot taffit at moszumanska.debian.org
Tue Jun 28 17:12:04 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 2f2ea6160b6af3a5018340db03e41d7a167f9b0b
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Mon Dec 28 14:10:30 2015 +0100

    Ensure that the `baseTransform` is applied when rendering annotations
    
    Fixes 3350.
    Fixes 5946.
    Fixes 6334.
    Fixes 6722.
    Probably fixes 3826 (since the PDF files are no longer available, I cannot confirm it).
---
 src/display/canvas.js   |   4 ++++
 test/pdfs/.gitignore    |   1 +
 test/pdfs/issue5946.pdf | Bin 0 -> 239220 bytes
 test/test_manifest.json |   7 +++++++
 4 files changed, 12 insertions(+)

diff --git a/src/display/canvas.js b/src/display/canvas.js
index 8f058d1..3cbf0c2 100644
--- a/src/display/canvas.js
+++ b/src/display/canvas.js
@@ -1839,6 +1839,10 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
     beginAnnotations: function CanvasGraphics_beginAnnotations() {
       this.save();
       this.current = new CanvasExtraState();
+
+      if (this.baseTransform) {
+        this.ctx.setTransform.apply(this.ctx, this.baseTransform);
+      }
     },
 
     endAnnotations: function CanvasGraphics_endAnnotations() {
diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore
index d3a7680..34e5dc6 100644
--- a/test/pdfs/.gitignore
+++ b/test/pdfs/.gitignore
@@ -11,6 +11,7 @@
 !issue2391-2.pdf
 !issue4665.pdf
 !issue5801.pdf
+!issue5946.pdf
 !issue5972.pdf
 !issue5874.pdf
 !filled-background.pdf
diff --git a/test/pdfs/issue5946.pdf b/test/pdfs/issue5946.pdf
new file mode 100644
index 0000000..af925d9
Binary files /dev/null and b/test/pdfs/issue5946.pdf differ
diff --git a/test/test_manifest.json b/test/test_manifest.json
index 92d433d..ed5668d 100644
--- a/test/test_manifest.json
+++ b/test/test_manifest.json
@@ -637,6 +637,13 @@
        "link": false,
        "type": "eq"
     },
+    {  "id": "issue5946",
+       "file": "pdfs/issue5946.pdf",
+       "md5": "1217a3c8e2ee4ceb96d85a2f27e437b4",
+       "rounds": 1,
+       "link": false,
+       "type": "eq"
+    },
     {  "id": "issue5954",
        "file": "pdfs/issue5954.pdf",
        "md5": "4f60ec0d9bbeec845b681242b8982361",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list