commit
d0f87457d7
@ -87,8 +87,6 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
xobj, smask,
|
||||
operatorList,
|
||||
state) {
|
||||
var self = this;
|
||||
|
||||
var matrix = xobj.dict.get('Matrix');
|
||||
var bbox = xobj.dict.get('BBox');
|
||||
var group = xobj.dict.get('Group');
|
||||
|
@ -1688,7 +1688,6 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
|
||||
this.inputBits = 0;
|
||||
this.inputBuf = 0;
|
||||
this.outputBits = 0;
|
||||
this.buf = EOF;
|
||||
|
||||
var code1;
|
||||
while ((code1 = this.lookBits(12)) === 0) {
|
||||
@ -1710,7 +1709,6 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
|
||||
CCITTFaxStream.prototype.readBlock = function CCITTFaxStream_readBlock() {
|
||||
while (!this.eof) {
|
||||
var c = this.lookChar();
|
||||
this.buf = EOF;
|
||||
this.ensureBuffer(this.bufferLength + 1);
|
||||
this.buffer[this.bufferLength++] = c;
|
||||
}
|
||||
@ -1766,9 +1764,6 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
|
||||
};
|
||||
|
||||
CCITTFaxStream.prototype.lookChar = function CCITTFaxStream_lookChar() {
|
||||
if (this.buf != EOF)
|
||||
return this.buf;
|
||||
|
||||
var refLine = this.refLine;
|
||||
var codingLine = this.codingLine;
|
||||
var columns = this.columns;
|
||||
@ -2014,8 +2009,9 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
|
||||
this.row++;
|
||||
}
|
||||
|
||||
var c;
|
||||
if (this.outputBits >= 8) {
|
||||
this.buf = (this.codingPos & 1) ? 0 : 0xFF;
|
||||
c = (this.codingPos & 1) ? 0 : 0xFF;
|
||||
this.outputBits -= 8;
|
||||
if (this.outputBits === 0 && codingLine[this.codingPos] < columns) {
|
||||
this.codingPos++;
|
||||
@ -2024,19 +2020,19 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
|
||||
}
|
||||
} else {
|
||||
var bits = 8;
|
||||
this.buf = 0;
|
||||
c = 0;
|
||||
do {
|
||||
if (this.outputBits > bits) {
|
||||
this.buf <<= bits;
|
||||
c <<= bits;
|
||||
if (!(this.codingPos & 1)) {
|
||||
this.buf |= 0xFF >> (8 - bits);
|
||||
c |= 0xFF >> (8 - bits);
|
||||
}
|
||||
this.outputBits -= bits;
|
||||
bits = 0;
|
||||
} else {
|
||||
this.buf <<= this.outputBits;
|
||||
c <<= this.outputBits;
|
||||
if (!(this.codingPos & 1)) {
|
||||
this.buf |= 0xFF >> (8 - this.outputBits);
|
||||
c |= 0xFF >> (8 - this.outputBits);
|
||||
}
|
||||
bits -= this.outputBits;
|
||||
this.outputBits = 0;
|
||||
@ -2045,16 +2041,16 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
|
||||
this.outputBits = (codingLine[this.codingPos] -
|
||||
codingLine[this.codingPos - 1]);
|
||||
} else if (bits > 0) {
|
||||
this.buf <<= bits;
|
||||
c <<= bits;
|
||||
bits = 0;
|
||||
}
|
||||
}
|
||||
} while (bits);
|
||||
}
|
||||
if (this.black) {
|
||||
this.buf ^= 0xFF;
|
||||
c ^= 0xFF;
|
||||
}
|
||||
return this.buf;
|
||||
return c;
|
||||
};
|
||||
|
||||
// This functions returns the code found from the table.
|
||||
|
@ -60,10 +60,7 @@ var TextLayerBuilder = function textLayerBuilder(options) {
|
||||
};
|
||||
|
||||
this.renderLayer = function textLayerBuilderRenderLayer() {
|
||||
var self = this;
|
||||
var textDivs = this.textDivs;
|
||||
var bidiTexts = this.textContent;
|
||||
var textLayerDiv = this.textLayerDiv;
|
||||
var canvas = document.createElement('canvas');
|
||||
var ctx = canvas.getContext('2d');
|
||||
|
||||
@ -93,7 +90,7 @@ var TextLayerBuilder = function textLayerBuilder(options) {
|
||||
}
|
||||
}
|
||||
|
||||
textLayerDiv.appendChild(textLayerFrag);
|
||||
this.textLayerDiv.appendChild(textLayerFrag);
|
||||
this.renderingDone = true;
|
||||
this.updateMatches();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user