summaryrefslogtreecommitdiffstats
path: root/src/rect.js
blob: 583556d0144a73ec3155e65b3d3517f4f50a3c9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
SVG.Rect = function() {
  this.constructor.call(this, SVG.create('rect'))
}

// Inherit from SVG.Shape
SVG.Rect.prototype = new SVG.Shape

//
SVG.extend(SVG.Container, {
  // Create a rect element
  rect: function(width, height) {
    return this.put(new SVG.Rect().size(width, height))
  }

})