Package Exports
- ctx-blur
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ctx-blur) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ctx-blur
Applies a blur filter to a canvas
Usage
var transform = cBlur(options)
options (object) - Options for blurring:
- radius {number} - guassian blur radius
returns (function) transform - A function that accepts a canvas and returns it blurred
Examples
javascript (browser)
const cBlur = require('ctx-blur')
var canvas = document.getElementById('aCanvas')
cBlur({ sigma: 2, radius: 2 })(canvas, function (err, newCanvas) {
...
})Node.js
const cBlur = require('ctx-blur')
var Canvas = require('canvas')
var canvas = new Canvas()
cIdentity({ sigma: 2, radius: 2 })(canvas, function (err, newCanvas) {
...
})