[Pkg-javascript-commits] [pdf.js] 94/141: Fixes documentation for PDFPage.render
David Prévot
taffit at moszumanska.debian.org
Sat Apr 19 22:40:34 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 175fbce0df8be2fd6b750dba7bee18c3d815989d
Author: Yury Delendik <ydelendik at mozilla.com>
Date: Fri Apr 11 10:57:48 2014 -0500
Fixes documentation for PDFPage.render
---
src/display/api.js | 35 ++++++++++++++++++++++-------------
1 file changed, 22 insertions(+), 13 deletions(-)
diff --git a/src/display/api.js b/src/display/api.js
index 7495907..1f0e527 100644
--- a/src/display/api.js
+++ b/src/display/api.js
@@ -361,7 +361,8 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
*/
/**
- * Text style
+ * Text style.
+ *
* @typedef {Object} TextStyle
* @property {number} ascent - font ascent.
* @property {number} descent - font descent.
@@ -370,6 +371,23 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
*/
/**
+ * Page render parameters.
+ *
+ * @typedef {Object} RenderParameters
+ * @property {Object} canvasContext - A 2D context of a DOM Canvas object.
+ * @property {PageViewport} viewport - Rendering viewport obtained by
+ * calling of PDFPage.getViewport method.
+ * @property {string} intent - Rendering intent, can be 'display' or 'print'
+ * (default value is 'display').
+ * @property {Object} imageLayer - (optional) An object that has beginLayout,
+ * endLayout and appendImage functions.
+ * @property {function} continueCallback - (optional) A function that will be
+ * called each time the rendering is paused. To continue
+ * rendering call the function that is the first argument
+ * to the callback.
+ */
+
+/**
* Proxy to a PDFPage in the worker thread.
* @class
*/
@@ -441,18 +459,9 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
},
/**
* Begins the process of rendering a page to the desired context.
- * @param {Object} params A parameter object that supports:
- * {
- * canvasContext(required): A 2D context of a DOM Canvas object.,
- * 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
- * first argument to the callback.
- * }.
- * @return {RenderTask} An extended promise that is resolved when the page
- * finishes rendering (see RenderTask).
+ * @param {RenderParameters} params Page render parameters.
+ * @return {RenderTask} An object that contains the promise, which
+ * is resolved when the page finishes rendering.
*/
render: function PDFPageProxy_render(params) {
var stats = this.stats;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list