Browse Source

Rename some variables.

Brendan Dahl 14 years ago
parent
commit
5cfe97611f
  1. 12
      src/evaluator.js
  2. 4
      src/image.js

12
src/evaluator.js

@ -221,15 +221,15 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -221,15 +221,15 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
fn = 'paintImageXObject';
PDFImage.buildImage(function(imageObj) {
var mw = imageObj.maxWidth;
var mh = imageObj.maxHeight;
var drawWidth = imageObj.drawWidth;
var drawHeight = imageObj.drawHeight;
var imgData = {
width: mw,
height: mh,
data: new Uint8Array(mw * mh * 4)
width: drawWidth,
height: drawHeight,
data: new Uint8Array(drawWidth * drawHeight * 4)
};
var pixels = imgData.data;
imageObj.fillRgbaBuffer(pixels, mw, mh);
imageObj.fillRgbaBuffer(pixels, drawWidth, drawHeight);
handler.send('obj', [objId, 'Image', imgData]);
}, handler, xref, resources, image, inline);
}

4
src/image.js

@ -167,12 +167,12 @@ var PDFImage = (function PDFImageClosure() { @@ -167,12 +167,12 @@ var PDFImage = (function PDFImageClosure() {
};
PDFImage.prototype = {
get maxWidth() {
get drawWidth() {
if (!this.smask)
return this.width;
return Math.max(this.width, this.smask.width);
},
get maxHeight() {
get drawHeight() {
if (!this.smask)
return this.height;
return Math.max(this.height, this.smask.height);

Loading…
Cancel
Save