From 89a953dde03ba2a1aa9bd9c2f735b8e1f9e07dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 19 Mar 2017 14:50:59 +0100 Subject: [PATCH] Docs: Add documentation for options.bound and options.matrix in #exportSVG() Closes #1254 --- src/item/Item.js | 8 ++++++++ src/item/Project.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/item/Item.js b/src/item/Item.js index 6334a6eb..7f757347 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -2259,6 +2259,14 @@ new function() { // Injection scope for hit-test functions shared with project * @name Item#exportSVG * @function * + * @option [options.bounds='view'] {String|Rectangle} the bounds of the area + * to export, either as a string ({@values 'view', content'}), or a + * {@link Rectangle} object: `'view'` uses the view bounds, + * `'content'` uses the stroke bounds of all content + * @option [options.matrix=paper.view.matrix] {Matrix} the matrix with which + * to transform the exported content: If `options.bounds` is set to + * `'view'`, `paper.view.matrix` is used, for all other settings of + * `options.bounds` the identity matrix is used. * @option [options.asString=false] {Boolean} whether a SVG node or a * `String` is to be returned * @option [options.precision=5] {Number} the amount of fractional digits in diff --git a/src/item/Project.js b/src/item/Project.js index 1b7fa182..09c7af09 100644 --- a/src/item/Project.js +++ b/src/item/Project.js @@ -760,6 +760,14 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{ * @name Project#exportSVG * @function * + * @option [options.bounds='view'] {String|Rectangle} the bounds of the area + * to export, either as a string ({@values 'view', content'}), or a + * {@link Rectangle} object: `'view'` uses the view bounds, + * `'content'` uses the stroke bounds of all content + * @option [options.matrix=paper.view.matrix] {Matrix} the matrix with which + * to transform the exported content: If `options.bounds` is set to + * `'view'`, `paper.view.matrix` is used, for all other settings of + * `options.bounds` the identity matrix is used. * @option [options.asString=false] {Boolean} whether a SVG node or a * `String` is to be returned * @option [options.precision=5] {Number} the amount of fractional digits in