]> git.parisson.com Git - pdf.js.git/commitdiff
No need to store ScratchCanvas on CanvasGraphics
authorJulian Viereck <julian.viereck@gmail.com>
Tue, 21 Feb 2012 13:30:40 +0000 (14:30 +0100)
committerJulian Viereck <julian.viereck@gmail.com>
Fri, 16 Mar 2012 13:56:43 +0000 (14:56 +0100)
src/canvas.js

index b87e1aeeb4ab0ae4c96e3862e7945b3ed55ad0b1..0d8a83ad693c062dc0b7516dcdc97bf3125e3f05 100644 (file)
@@ -199,7 +199,6 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
     this.pendingClip = null;
     this.res = null;
     this.xobjs = null;
-    this.ScratchCanvas = ScratchCanvas;
     this.objs = objs;
     this.textLayer = textLayer;
     if (canvasCtx) {
@@ -1116,7 +1115,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
       // scale the image to the unit square
       ctx.scale(1 / w, -1 / h);
 
-      var tmpCanvas = new this.ScratchCanvas(w, h);
+      var tmpCanvas = new ScratchCanvas(w, h);
       var tmpCtx = tmpCanvas.getContext('2d');
 
       var fillColor = this.current.fillColor;
@@ -1147,7 +1146,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
       // scale the image to the unit square
       ctx.scale(1 / w, -1 / h);
 
-      var tmpCanvas = new this.ScratchCanvas(w, h);
+      var tmpCanvas = new ScratchCanvas(w, h);
       var tmpCtx = tmpCanvas.getContext('2d');
       this.putBinaryImageData(tmpCtx, imgData, w, h);