mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Fix imageObj.imageMask bug from merge
This commit is contained in:
parent
435d9f2e9a
commit
b873c1f4da
1 changed files with 7 additions and 7 deletions
14
pdf.js
14
pdf.js
|
@ -6057,13 +6057,13 @@ var CanvasGraphics = (function canvasGraphics() {
|
|||
|
||||
var tmpCanvas = new this.ScratchCanvas(w, h);
|
||||
var tmpCtx = tmpCanvas.getContext('2d');
|
||||
if (imageObj.imageMask) {
|
||||
var fillColor = this.current.fillColor;
|
||||
tmpCtx.fillStyle = (fillColor && fillColor.hasOwnProperty('type') &&
|
||||
fillColor.type === 'Pattern') ?
|
||||
fillColor.getPattern(tmpCtx) : fillColor;
|
||||
tmpCtx.fillRect(0, 0, w, h);
|
||||
}
|
||||
|
||||
var fillColor = this.current.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);
|
||||
var pixels = imgData.data;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue