StackBlur/docs/jsdoc/module-StackBlur.html
2018-11-06 14:40:16 +08:00

2207 lines
25 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Module: StackBlur</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Module: StackBlur</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="description"><p>StackBlur - a fast almost Gaussian Blur For Canvas</p>
<p>In case you find this class useful - especially in commercial projects -
I am not totally unhappy for a small donation to my PayPal account
<a href="mailto:mario@quasimondo.de">mario@quasimondo.de</a></p>
<p>Or support me on flattr:
<a href="https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript">https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript</a></p></div>
<dl class="details">
<dt class="tag-version">Version:</dt>
<dd class="tag-version"><ul class="dummy"><li>0.5</li></ul></dd>
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Mario Klingemann
Contact: mario@quasimondo.com
Website: <a href="http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html">http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html</a>
Twitter: @quasimondo</li>
</ul>
</dd>
<dt class="tag-copyright">Copyright:</dt>
<dd class="tag-copyright"><ul class="dummy"><li>(c) 2010 Mario Klingemann
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="stackblur.js.html">stackblur.js</a>, <a href="stackblur.js.html#line1">line 1</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Classes</h3>
<dl>
<dt><a href="module-StackBlur.BlurStack.html">BlurStack</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".canvasRGB"><span class="type-signature">(static) </span>canvasRGB<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="stackblur.js.html">stackblur.js</a>, <a href="stackblur.js.html#line640">line 640</a>
</li></ul></dd>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-StackBlur.html#~processCanvasRGB">module:StackBlur~processCanvasRGB</a></li>
</ul>
</dd>
</dl>
<h4 class="name" id=".canvasRGBA"><span class="type-signature">(static) </span>canvasRGBA<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="stackblur.js.html">stackblur.js</a>, <a href="stackblur.js.html#line635">line 635</a>
</li></ul></dd>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-StackBlur.html#~processCanvasRGBA">module:StackBlur~processCanvasRGBA</a></li>
</ul>
</dd>
</dl>
<h4 class="name" id=".image"><span class="type-signature">(static) </span>image<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="stackblur.js.html">stackblur.js</a>, <a href="stackblur.js.html#line630">line 630</a>
</li></ul></dd>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-StackBlur.html#~processImage">module:StackBlur~processImage</a></li>
</ul>
</dd>
</dl>
<h4 class="name" id=".imageDataRGB"><span class="type-signature">(static) </span>imageDataRGB<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="stackblur.js.html">stackblur.js</a>, <a href="stackblur.js.html#line650">line 650</a>
</li></ul></dd>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-StackBlur.html#~processImageDataRGB">module:StackBlur~processImageDataRGB</a></li>
</ul>
</dd>
</dl>
<h4 class="name" id=".imageDataRGBA"><span class="type-signature">(static) </span>imageDataRGBA<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="stackblur.js.html">stackblur.js</a>, <a href="stackblur.js.html#line645">line 645</a>
</li></ul></dd>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-StackBlur.html#~processImageDataRGBA">module:StackBlur~processImageDataRGBA</a></li>
</ul>
</dd>
</dl>
<h4 class="name" id="~getImageDataFromCanvas"><span class="type-signature">(inner) </span>getImageDataFromCanvas<span class="signature">(canvas, topX, topY, width, height)</span><span class="type-signature"> &rarr; {ImageData}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>canvas</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">HTMLCanvasElement</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>topX</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>topY</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="stackblur.js.html">stackblur.js</a>, <a href="stackblur.js.html#line128">line 128</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
|
<span class="param-type">TypeError</span>
</div>
<h5>Returns:</h5>
<div class="param-desc">
<p>See <a href="https://html.spec.whatwg.org/multipage/canvas.html#imagedata">https://html.spec.whatwg.org/multipage/canvas.html#imagedata</a></p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">ImageData</span>
</dd>
</dl>
<h4 class="name" id="~processCanvasRGB"><span class="type-signature">(inner) </span>processCanvasRGB<span class="signature">(canvas, topX, topY, width, height, radius)</span><span class="type-signature"> &rarr; {undefined}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>canvas</code></td>
<td class="type">
<span class="param-type">HTMLCanvasElement</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>topX</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>topY</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>radius</code></td>
<td class="type">
<span class="param-type">Float</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="stackblur.js.html">stackblur.js</a>, <a href="stackblur.js.html#line406">line 406</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">undefined</span>
</dd>
</dl>
<h4 class="name" id="~processCanvasRGBA"><span class="type-signature">(inner) </span>processCanvasRGBA<span class="signature">(canvas, topX, topY, width, height, radius)</span><span class="type-signature"> &rarr; {undefined}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>canvas</code></td>
<td class="type">
<span class="param-type">HTMLCanvasElement</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>topX</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>topY</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>radius</code></td>
<td class="type">
<span class="param-type">Float</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="stackblur.js.html">stackblur.js</a>, <a href="stackblur.js.html#line154">line 154</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">undefined</span>
</dd>
</dl>
<h4 class="name" id="~processImage"><span class="type-signature">(inner) </span>processImage<span class="signature">(img, canvas, radius, blurAlphaChannel)</span><span class="type-signature"> &rarr; {undefined}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>img</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">HTMLImageElement</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>canvas</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">HTMLCanvasElement</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>radius</code></td>
<td class="type">
<span class="param-type">Float</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>blurAlphaChannel</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="stackblur.js.html">stackblur.js</a>, <a href="stackblur.js.html#line84">line 84</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">undefined</span>
</dd>
</dl>
<h4 class="name" id="~processImageDataRGB"><span class="type-signature">(inner) </span>processImageDataRGB<span class="signature">(imageData, topX, topY, width, height, radius)</span><span class="type-signature"> &rarr; {ImageData}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>imageData</code></td>
<td class="type">
<span class="param-type">ImageData</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>topX</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>topY</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>radius</code></td>
<td class="type">
<span class="param-type">Float</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="stackblur.js.html">stackblur.js</a>, <a href="stackblur.js.html#line425">line 425</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">ImageData</span>
</dd>
</dl>
<h4 class="name" id="~processImageDataRGBA"><span class="type-signature">(inner) </span>processImageDataRGBA<span class="signature">(imageData, topX, topY, width, height, radius)</span><span class="type-signature"> &rarr; {ImageData}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>imageData</code></td>
<td class="type">
<span class="param-type">ImageData</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>topX</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>topY</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">Integer</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>radius</code></td>
<td class="type">
<span class="param-type">Float</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="stackblur.js.html">stackblur.js</a>, <a href="stackblur.js.html#line174">line 174</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">ImageData</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-StackBlur.html">StackBlur</a></li></ul><h3>Classes</h3><ul><li><a href="module-StackBlur.BlurStack.html">BlurStack</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Nov 06 2018 14:39:22 GMT+0800 (CST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>