//>>built
define("dojox/gfx/svgext",["dojo/dom","dojo/_base/array","dojo/_base/window","./_base","./svg"],function(m,f,g,h,e){function k(a,b){var c=b.ownerDocument.createElementNS(e.xmlns.svg,a.tag);b.appendChild(c);for(var d in a)d in l||c.setAttribute(d,a[d]);a.children&&f.forEach(a.children,function(n){k(n,c)});return c}g=h.svgext={};var l={primitives:null,tag:null,children:null};e.Shape.extend({addRenderingOption:function(a,b){this.rawNode.setAttribute(a,b);return this},setFilter:function(a){if(!a)return this.rawNode.removeAttribute("filter"),
this.filter=null,this;this.filter=a;a.id=a.id||h._base._getUniqueId();var b=m.byId(a.id);if(!b){b=this.rawNode.ownerDocument.createElementNS(e.xmlns.svg,"filter");b.setAttribute("filterUnits","userSpaceOnUse");for(var c in a)c in l||b.setAttribute(c,a[c]);f.forEach(a.primitives,function(d){k(d,b)});(c=this._getParentSurface())&&c.defNode.appendChild(b)}this.rawNode.setAttribute("filter","url(#"+a.id+")");return this},getFilter:function(){return this.filter}});return g});