No need to store ScratchCanvas on CanvasGraphics
This commit is contained in:
		
							parent
							
								
									1c87b63124
								
							
						
					
					
						commit
						8325d37f9d
					
				| @ -199,7 +199,6 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { | |||||||
|     this.pendingClip = null; |     this.pendingClip = null; | ||||||
|     this.res = null; |     this.res = null; | ||||||
|     this.xobjs = null; |     this.xobjs = null; | ||||||
|     this.ScratchCanvas = ScratchCanvas; |  | ||||||
|     this.objs = objs; |     this.objs = objs; | ||||||
|     this.textLayer = textLayer; |     this.textLayer = textLayer; | ||||||
|     if (canvasCtx) { |     if (canvasCtx) { | ||||||
| @ -1116,7 +1115,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { | |||||||
|       // scale the image to the unit square
 |       // scale the image to the unit square
 | ||||||
|       ctx.scale(1 / w, -1 / h); |       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 tmpCtx = tmpCanvas.getContext('2d'); | ||||||
| 
 | 
 | ||||||
|       var fillColor = this.current.fillColor; |       var fillColor = this.current.fillColor; | ||||||
| @ -1147,7 +1146,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { | |||||||
|       // scale the image to the unit square
 |       // scale the image to the unit square
 | ||||||
|       ctx.scale(1 / w, -1 / h); |       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 tmpCtx = tmpCanvas.getContext('2d'); | ||||||
|       this.putBinaryImageData(tmpCtx, imgData, w, h); |       this.putBinaryImageData(tmpCtx, imgData, w, h); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user