|
|
|
@ -522,9 +522,9 @@ if (typeof PDFJS === 'undefined') {
@@ -522,9 +522,9 @@ if (typeof PDFJS === 'undefined') {
|
|
|
|
|
|
|
|
|
|
if (polyfill) { |
|
|
|
|
var contextPrototype = window.CanvasRenderingContext2D.prototype; |
|
|
|
|
contextPrototype._createImageData = contextPrototype.createImageData; |
|
|
|
|
var createImageData = contextPrototype.createImageData; |
|
|
|
|
contextPrototype.createImageData = function(w, h) { |
|
|
|
|
var imageData = this._createImageData(w, h); |
|
|
|
|
var imageData = createImageData.call(this, w, h); |
|
|
|
|
imageData.data.set = function(arr) { |
|
|
|
|
for (var i = 0, ii = this.length; i < ii; i++) { |
|
|
|
|
this[i] = arr[i]; |
|
|
|
@ -532,6 +532,8 @@ if (typeof PDFJS === 'undefined') {
@@ -532,6 +532,8 @@ if (typeof PDFJS === 'undefined') {
|
|
|
|
|
}; |
|
|
|
|
return imageData; |
|
|
|
|
}; |
|
|
|
|
// this closure will be kept referenced, so clear its vars
|
|
|
|
|
contextPrototype = null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
})(); |
|
|
|
|