Rename some variables.
This commit is contained in:
parent
db4a11e568
commit
5cfe97611f
@ -221,15 +221,15 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||||||
fn = 'paintImageXObject';
|
fn = 'paintImageXObject';
|
||||||
|
|
||||||
PDFImage.buildImage(function(imageObj) {
|
PDFImage.buildImage(function(imageObj) {
|
||||||
var mw = imageObj.maxWidth;
|
var drawWidth = imageObj.drawWidth;
|
||||||
var mh = imageObj.maxHeight;
|
var drawHeight = imageObj.drawHeight;
|
||||||
var imgData = {
|
var imgData = {
|
||||||
width: mw,
|
width: drawWidth,
|
||||||
height: mh,
|
height: drawHeight,
|
||||||
data: new Uint8Array(mw * mh * 4)
|
data: new Uint8Array(drawWidth * drawHeight * 4)
|
||||||
};
|
};
|
||||||
var pixels = imgData.data;
|
var pixels = imgData.data;
|
||||||
imageObj.fillRgbaBuffer(pixels, mw, mh);
|
imageObj.fillRgbaBuffer(pixels, drawWidth, drawHeight);
|
||||||
handler.send('obj', [objId, 'Image', imgData]);
|
handler.send('obj', [objId, 'Image', imgData]);
|
||||||
}, handler, xref, resources, image, inline);
|
}, handler, xref, resources, image, inline);
|
||||||
}
|
}
|
||||||
|
@ -167,12 +167,12 @@ var PDFImage = (function PDFImageClosure() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
PDFImage.prototype = {
|
PDFImage.prototype = {
|
||||||
get maxWidth() {
|
get drawWidth() {
|
||||||
if (!this.smask)
|
if (!this.smask)
|
||||||
return this.width;
|
return this.width;
|
||||||
return Math.max(this.width, this.smask.width);
|
return Math.max(this.width, this.smask.width);
|
||||||
},
|
},
|
||||||
get maxHeight() {
|
get drawHeight() {
|
||||||
if (!this.smask)
|
if (!this.smask)
|
||||||
return this.height;
|
return this.height;
|
||||||
return Math.max(this.height, this.smask.height);
|
return Math.max(this.height, this.smask.height);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user