1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

add imageLayer

add optional imageLayer object to access images and there
position and size as they are rendered on the canvas.
This commit is contained in:
j 2013-02-10 23:49:36 +05:30
parent d23ae9c425
commit cd42ccd439
2 changed files with 56 additions and 5 deletions

View file

@ -247,6 +247,8 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
* canvasContext(required): A 2D context of a DOM Canvas object.,
* textLayer(optional): An object that has beginLayout, endLayout, and
* appendText functions.,
* imageLayer(optional): An object that has beginLayout, endLayout and
* appendImage functions.,
* continueCallback(optional): A function that will be called each time
* the rendering is paused. To continue
* rendering call the function that is the
@ -298,7 +300,7 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
}
var gfx = new CanvasGraphics(params.canvasContext, this.commonObjs,
this.objs, params.textLayer);
this.objs, params.textLayer, params.imageLayer);
try {
this.display(gfx, params.viewport, complete, continueCallback);
} catch (e) {