diff options
author | wout <wout@impinc.co.uk> | 2012-12-22 15:59:41 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2012-12-22 15:59:41 +0100 |
commit | 0967c92e66904a0267524e371adb45ecd9a024fb (patch) | |
tree | 1494eeacc51636f0999affb36d4b010d10e66abd | |
parent | ca6b0aa77b4ca7a9da616205d4cf0fa108202134 (diff) | |
download | svg.js-0967c92e66904a0267524e371adb45ecd9a024fb.tar.gz svg.js-0967c92e66904a0267524e371adb45ecd9a024fb.zip |
Added more info on gradients
-rw-r--r-- | README.md | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -214,7 +214,7 @@ rect.clip(function(clipPath) { You can also reuse clip paths for multiple elements using 'clipTo()'. ```javascript -var clipPath = doc.defs().clipPath(); +var clipPath = doc.defs().clip(); clipRect = clipPath.rect(80, 80).move(10, 10); rect.clipTo(clipPath); ``` @@ -302,6 +302,10 @@ draw.gradient('radial', function(stop) { s1.update({ offset: 10, color: '#0f0', opacity: 1 }); ``` +[W3Schools](http://www.w3schools.com/svg/svg_grad_linear.asp) has a great example page on how +[linear gradients](http://www.w3schools.com/svg/svg_grad_linear.asp) and +[radial gradients](http://www.w3schools.com/svg/svg_grad_radial.asp) work. + _This functionality requires the gradient.js module which is included in the default distribution._ |