Support future syntax of agg-stack-blur

This commit is contained in:
Tom MacWright 2012-05-22 16:19:28 -04:00
parent d353fc48cb
commit fef914cdc2
3 changed files with 6 additions and 2 deletions

View File

@ -143,6 +143,10 @@ for (var i = 0; i < image_filter_functors.length; i++) {
})(f);
}
tree.functions['agg-stack-blur'] = function(x, y) {
return new tree.ImageFilter('agg-stack-blur', [x, y]);
}
function hsla(hsla) {
return tree.functions.hsla(hsla.h, hsla.s, hsla.l, hsla.a);

View File

@ -12,7 +12,7 @@ tree.ImageFilter.prototype = {
toString: function() {
if (this.args) {
// TODO
return this.filter + ':' + this.args.join(',');
} else {
return this.filter;
}

View File

@ -2,7 +2,7 @@
polygon-fill: #FFF;
line-color:#F00;
line-width: 0.5;
image-filters: blur(), sharpen();
image-filters: blur() sharpen() agg-stack-blur(2, 2);
composite-operation: src-in;
line-dasharray: 2, 3;
}