aboutsummaryrefslogtreecommitdiffstats
path: root/src/rect.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/rect.js')
-rw-r--r--src/rect.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rect.js b/src/rect.js
index 1a3bf19..583556d 100644
--- a/src/rect.js
+++ b/src/rect.js
@@ -3,4 +3,13 @@ SVG.Rect = function() {
}
// Inherit from SVG.Shape
-SVG.Rect.prototype = new SVG.Shape \ No newline at end of file
+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))
+ }
+
+}) \ No newline at end of file