Documentation for Visitor

This commit is contained in:
Michal Szczepanski 2019-07-22 23:34:41 +02:00
parent 2f4fa0c474
commit 9f9126e2c0
1 changed files with 26 additions and 5 deletions

View File

@ -17,10 +17,7 @@ class Visitor {
}
/**
*
* @param args
* @param page
* @param dependencies
* pdf.OPS.beginText
*/
beginText(args, page, dependencies) {
if (this.debug) console.log('beginText');
@ -29,13 +26,19 @@ class Visitor {
this.currentObject.newLine();
this.objectList.push(this.currentObject);
}
/**
* pdf.OPS.setFont
*/
setFont(args, page, dependencies) {
if (this.debug) console.log('setFont');
if (this.skip) return;
this.currentFont = this.txt.getFont(args, page, dependencies)
}
/**
* pdf.OPS.showText
*/
showText(args, page, dependencies) {
if (this.debug) console.log("showText");
if (this.skip) return;
@ -46,6 +49,9 @@ class Visitor {
el2.setText(this.txt.getText(args[0], el2)+" ");
}
/**
* pdf.OPS.showSpacedText
*/
showSpacedText(args, page, dependencies) {
if (this.debug) console.log("showSpacedText");
if (this.skip) return;
@ -56,12 +62,18 @@ class Visitor {
el2.setText(this.txt.getText(args[0], el2)+" ");
}
/**
* pdf.OPS.endText
*/
endText(args, page, dependencies) {
if (this.debug) console.log('endText');
if (this.skip) return;
this.currentObject = null;
}
/**
* pdf.OPS.moveText
*/
moveText(args, page, dependencies) {
if (this.debug) console.log('moveText');
if (this.skip) return;
@ -81,6 +93,9 @@ class Visitor {
el.setPosition(this.currentObject.x, this.currentObject.y);
}
/**
* pdf.OPS.setTextMatrix
*/
setTextMatrix(args, page, dependencies) {
if (this.debug) console.log('setTextMatrix');
if (this.skip) return;
@ -92,6 +107,9 @@ class Visitor {
}
/**
* pdf.OPS.paintFormXObjectBegin
*/
paintFormXObjectBegin(args, page, dependencies) {
if(this.debug) console.log('paintFormXObjectBegin');
if(!this.config.paintFormXObject) {
@ -99,6 +117,9 @@ class Visitor {
}
}
/**
* pdf.OPS.paintFormXObjectEnd
*/
paintFormXObjectEnd(args, page, dependencies) {
if(this.debug) console.log('paintFormXObjectEnd');
this.skip = false;