]> git.parisson.com Git - pdf.js.git/commitdiff
Small rebase tidyup + cleanup
authorJulian Viereck <julian.viereck@gmail.com>
Thu, 23 Jun 2011 21:55:14 +0000 (23:55 +0200)
committerJulian Viereck <julian.viereck@gmail.com>
Thu, 23 Jun 2011 21:55:14 +0000 (23:55 +0200)
pdf.js
viewer_worker.html
worker_client.js

diff --git a/pdf.js b/pdf.js
index 84706794619f0c799d12f305b4383fb6497e2608..da5926c09de746bd4bc182e9a68edcc8c39e59c7 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -2287,6 +2287,14 @@ var CanvasGraphics = (function() {
         this.ScratchCanvas = imageCanvas || ScratchCanvas;
     }
 
+    var LINE_CAP_STYLES = [ "butt", "round", "square" ];
+    var LINE_JOIN_STYLES = [ "miter", "round", "bevel" ];
+    var NORMAL_CLIP = {};
+    var EO_CLIP = {};
+
+    // Used for tiling patterns
+    var PAINT_TYPE_COLORED = 1, PAINT_TYPE_UNCOLORED = 2;
+
     constructor.prototype = {
         map: {
             // Graphics state
@@ -2381,18 +2389,8 @@ var CanvasGraphics = (function() {
             // Compatibility
             BX: "beginCompat",
             EX: "endCompat",
-        };
-    }
-
-    var LINE_CAP_STYLES = [ "butt", "round", "square" ];
-    var LINE_JOIN_STYLES = [ "miter", "round", "bevel" ];
-    var NORMAL_CLIP = {};
-    var EO_CLIP = {};
-
-    // Used for tiling patterns
-    var PAINT_TYPE_COLORED = 1, PAINT_TYPE_UNCOLORED = 2;
-
-    constructor.prototype = {
+        },
+      
         translateFont: function(fontDict, xref, resources) {
             var fd = fontDict.get("FontDescriptor");
             if (!fd)
@@ -2855,7 +2853,7 @@ var CanvasGraphics = (function() {
             this.ctx.scale(1, -1);
 
             if (this.ctx.$showText) {
-                this.ctx.$showText(this.current.y, text, Fonts.charsToUnicode(text));
+                this.ctx.$showText(this.current.y, Fonts.charsToUnicode(text));
             } else {
                 text = Fonts.charsToUnicode(text);
                 this.ctx.translate(this.current.x, -1 * this.current.y);
index d13935f13068ca84b013e58ac64b76fdc1c451bb..51f2b9d8a9618539fb20ed7baf7f97380fc72ba1 100644 (file)
@@ -1,6 +1,6 @@
 <html>
     <head>
-        <title>Simple pdf.js page viewer worker</title>
+        <title>Simple pdf.js page worker viewer</title>
         <script type="text/javascript" src="worker_client.js"></script>
 <script>
 
index b39374af117fb617669412d6da22c93f0eb4189b..359a5f7c10ea8208c47ea19b1c0a4330173b2930 100644 (file)
@@ -55,9 +55,9 @@ function WorkerPDFDoc(canvas) {
       currentX = currentXStack.pop();
     },
 
-    "$showText": function(y, text, uniText) {
+    "$showText": function(y, text) {
       this.translate(currentX, -1 * y);
-      this.fillText(uniText, 0, 0);
+      this.fillText(text, 0, 0);
       currentX += this.measureText(text).width;
     },