diff options
Diffstat (limited to 'src/clip.js')
-rw-r--r-- | src/clip.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/clip.js b/src/clip.js new file mode 100644 index 0000000..80d78d0 --- /dev/null +++ b/src/clip.js @@ -0,0 +1,14 @@ +// initialize id sequence +var clipID = 0; + +SVG.Clip = function Clip() { + this.constructor.call(this, SVG.create('clipPath')); + this.id = '_' + (clipID++); + this.attr('id', this.id); +}; + +// inherit from SVG.Element +SVG.Clip.prototype = new SVG.Element(); + +// include the container object +SVG.Utils.merge(SVG.Clip, SVG.Container);
\ No newline at end of file |