]> git.parisson.com Git - pdf.js.git/commitdiff
new ScratchCanvas -> createScratchCanvas and fix linting
authorJulian Viereck <julian.viereck@gmail.com>
Thu, 23 Feb 2012 14:46:00 +0000 (15:46 +0100)
committerJulian Viereck <julian.viereck@gmail.com>
Fri, 16 Mar 2012 13:56:43 +0000 (14:56 +0100)
src/canvas.js
src/core.js
src/pattern.js

index db1461aa7fd7c052ae43da99180be84ac44e328f..7fb85f1b5b6f5d78ab24f5664244e599fb038a10 100644 (file)
@@ -70,7 +70,7 @@ var CanvasExtraState = (function CanvasExtraStateClosure() {
   return CanvasExtraState;
 })();
 
-function ScratchCanvas(width, height) {
+function createScratchCanvas(width, height) {
   var canvas = document.createElement('canvas');
   canvas.width = width;
   canvas.height = height;
@@ -1115,7 +1115,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
       // scale the image to the unit square
       ctx.scale(1 / w, -1 / h);
 
-      var tmpCanvas = new ScratchCanvas(w, h);
+      var tmpCanvas = createScratchCanvas(w, h);
       var tmpCtx = tmpCanvas.getContext('2d');
 
       var fillColor = this.current.fillColor;
@@ -1146,7 +1146,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
       // scale the image to the unit square
       ctx.scale(1 / w, -1 / h);
 
-      var tmpCanvas = new ScratchCanvas(w, h);
+      var tmpCanvas = createScratchCanvas(w, h);
       var tmpCtx = tmpCanvas.getContext('2d');
       this.putBinaryImageData(tmpCtx, imgData, w, h);
 
index b62302a9c2331de73b25c85bb1280ad39720cfd7..16b7ee15d70f44b1acc18c2fdaddc6cff13cdfe4 100644 (file)
@@ -756,8 +756,8 @@ var PDFDoc = (function PDFDocClosure() {
               file = new Stream(file, 0, file.length, fontFileDict);
             }
 
-            // At this point, only the font object is created but the font is not
-            // yet attached to the DOM. This is done in `FontLoader.bind`.
+            // At this point, only the font object is created but the font is
+            // not yet attached to the DOM. This is done in `FontLoader.bind`.
             var font = new Font(name, file, properties);
             this.objs.resolve(id, font);
             break;
@@ -787,7 +787,7 @@ var PDFDoc = (function PDFDocClosure() {
           var size = width * height;
           var rgbaLength = size * 4;
           var buf = new Uint8Array(size * components);
-          var tmpCanvas = new ScratchCanvas(width, height);
+          var tmpCanvas = createScratchCanvas(width, height);
           var tmpCtx = tmpCanvas.getContext('2d');
           tmpCtx.drawImage(img, 0, 0);
           var data = tmpCtx.getImageData(0, 0, width, height).data;
index dff2a5b4462faf5ff85740a2a297cc38aea94102..8f5611ccd86f9e7d40812e9a59c226e090591bae 100644 (file)
@@ -222,7 +222,7 @@ var TilingPattern = (function TilingPatternClosure() {
       width = height = MAX_PATTERN_SIZE;
     }
 
-    var tmpCanvas = new ScratchCanvas(width, height);
+    var tmpCanvas = createScratchCanvas(width, height);
 
     // set the new canvas element context as the graphics context
     var tmpCtx = tmpCanvas.getContext('2d');