aboutsummaryrefslogtreecommitdiffstats
path: root/src/defs.js
blob: f5753e13aacd9c2713881cdbbddba190ec4888ea (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.extend(SVG.Defs, SVG.Container);

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

    return e;
  }
  
});