(ctx, width, height, sigma)
| 2372 | } |
| 2373 | |
| 2374 | function blur(ctx, width, height, sigma) |
| 2375 | { |
| 2376 | var srcData = ctx.getImageData(0, 0, width, height); |
| 2377 | var mask = make_fgauss(sigma); |
| 2378 | mask = normalize(mask); |
| 2379 | tmp = []; |
| 2380 | convolve_even(srcData.data, tmp, mask, width, height); |
| 2381 | convolve_even(tmp, srcData.data, mask, height, width); |
| 2382 | ctx.clearRect(0, 0, width, height); |
| 2383 | ctx.putImageData(srcData, 0, 0); |
| 2384 | } |
| 2385 | |
| 2386 | this.apply = function(ctx, x, y, width, height) { |
| 2387 | // assuming x==0 && y==0 for now |
no test coverage detected