diff options
author | wout <wout@impinc.co.uk> | 2012-12-17 19:39:52 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2012-12-17 19:39:52 +0100 |
commit | 8dfec33b4fa79b89d89a07e3ae92c5d5c5f8ce73 (patch) | |
tree | 7caa493057b543ac40008770fdb4df566995c4e7 /src/clip.js | |
parent | 6a013f19d6fa84e538d31bca5f1466c5f3479630 (diff) | |
download | svg.js-8dfec33b4fa79b89d89a07e3ae92c5d5c5f8ce73.tar.gz svg.js-8dfec33b4fa79b89d89a07e3ae92c5d5c5f8ce73.zip |
Code slimming
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 |