From 701b1c421663ac8d1e859c8c454d9adf13409d9a Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Fri, 10 Mar 2017 22:59:46 +0000 Subject: [PATCH] Document overlayWith image density parameter #729 --- docs/api-composite.md | 1 + lib/composite.js | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/api-composite.md b/docs/api-composite.md index 0fb45526..f1a47bac 100644 --- a/docs/api-composite.md +++ b/docs/api-composite.md @@ -20,6 +20,7 @@ If both `top` and `left` options are provided, they take precedence over `gravit - `options.left` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** the pixel offset from the left edge. - `options.tile` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** set to true to repeat the overlay image across the entire image with the given `gravity`. (optional, default `false`) - `options.cutout` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** set to true to apply only the alpha channel of the overlay image to the input image, giving the appearance of one image being cut out of another. (optional, default `false`) + - `options.density` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** integral number representing the DPI for vector overlay image. (optional, default `72`) - `options.raw` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** describes overlay when using raw pixel data. - `options.raw.width` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** - `options.raw.height` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** diff --git a/lib/composite.js b/lib/composite.js index 0d26b920..6e2205c8 100644 --- a/lib/composite.js +++ b/lib/composite.js @@ -33,6 +33,7 @@ const is = require('./is'); * @param {Number} [options.left] - the pixel offset from the left edge. * @param {Boolean} [options.tile=false] - set to true to repeat the overlay image across the entire image with the given `gravity`. * @param {Boolean} [options.cutout=false] - set to true to apply only the alpha channel of the overlay image to the input image, giving the appearance of one image being cut out of another. + * @param {Number} [options.density=72] - integral number representing the DPI for vector overlay image. * @param {Object} [options.raw] - describes overlay when using raw pixel data. * @param {Number} [options.raw.width] * @param {Number} [options.raw.height]