Fix strict javascript warning in CanvasGraphics.

This commit is contained in:
Kalervo Kujala 2011-10-20 23:56:23 +03:00
parent 5a699720bc
commit 7da3c68c48

5
pdf.js
View File

@ -5649,8 +5649,9 @@ var CanvasGraphics = (function canvasGraphics() {
var tmpCtx = tmpCanvas.getContext('2d');
if (imageObj.imageMask) {
var fillColor = this.current.fillColor;
tmpCtx.fillStyle = (fillColor && fillColor.type === 'Pattern') ?
fillColor.getPattern(tmpCtx) : fillColor;
tmpCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') &&
fillColor.type === 'Pattern') ?
fillColor.getPattern(tmpCtx) : fillColor;
tmpCtx.fillRect(0, 0, w, h);
}
var imgData = tmpCtx.getImageData(0, 0, w, h);