diff options
Diffstat (limited to 'src/defs.js')
-rw-r--r-- | src/defs.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/defs.js b/src/defs.js index e69de29..4661a54 100644 --- a/src/defs.js +++ b/src/defs.js @@ -0,0 +1,17 @@ +SVG.Defs = function Defs() { + this.constructor.call(this, SVG.createElement('defs')); +}; + +// inherit from SVG.Element +SVG.Defs.prototype = new SVG.Element(); + +// define clippath +SVG.Defs.prototype.clipPath = function() { + var e = new SVG.ClipPath(); + this.add(e); + + return e; +}; + +// include the container object +SVG.Defs.include(SVG.Container);
\ No newline at end of file |