aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.js
blob: b9340e484af6478be97b48f6623f1192f4e7f5a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
SVG.Image = function Image() {
  this.constructor.call(this, SVG.create('image'));
};

// Inherit from SVG.Element
SVG.Image.prototype = new SVG.Shape();

SVG.extend(SVG.Image, {
  
  /* (re)load image */
  load: function(url) {
    this.src = url;
    return (url ? this.attr('xlink:href', url, SVG.xlink) : this);
  }
  
});