aboutsummaryrefslogtreecommitdiffstats
path: root/src/defs.js
blob: 4c252a54a129b1ea3963f167dd4a83ae85f5eb8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
SVG.Defs = function Defs() {
  this.constructor.call(this, SVG.create('defs'));
};

// inherit from SVG.Element
SVG.Defs.prototype = new SVG.Element();

// include the container object
SVG.Utils.merge(SVG.Defs, SVG.Container);

// Add def-specific functions
SVG.Utils.merge(SVG.Defs, {
  
  // define clippath
  clipPath: function() {
    var e = new SVG.ClipPath();
    this.add(e);

    return e;
  }
  
});