]> git.parisson.com Git - pdf.js.git/commitdiff
Merge branch 'master' of github.com:andreasgal/pdf.js
authorsbarman <sbarman@L3CWZ5T.(none)>
Sun, 19 Jun 2011 19:04:57 +0000 (12:04 -0700)
committersbarman <sbarman@L3CWZ5T.(none)>
Sun, 19 Jun 2011 19:04:57 +0000 (12:04 -0700)
1  2 
pdf.js

diff --cc pdf.js
index 4eff1f061945db5396ac28841636e2d9595e3cea,a051e57f3e687bc656f39aa9b3f53ebe34368ed3..7436b9a43c87e1de76a55aa9071a5c7d02c5ecae
--- 1/pdf.js
--- 2/pdf.js
+++ b/pdf.js
@@@ -2400,13 -2531,9 +2531,13 @@@ var CanvasGraphics = (function() 
                  error("No support for array of functions");
              else if (!IsPDFFunction(fnObj))
                  error("Invalid function");
-             fn = new PDFFunction(this.xref, fnObj);
+             var fn = new PDFFunction(this.xref, fnObj);
  
              var gradient = this.ctx.createLinearGradient(x0, y0, x1, y1);
 +            
 +            // 10 samples seems good enough for now, but probably won't work
 +            // if there are sharp color changes. Ideally, we could see the 
 +            // current image size and base the # samples on that.
              var step = (t1 - t0) / 10;
              
              for (var i = t0; i <= t1; i += step) {