diff options
author | wout <wout@impinc.co.uk> | 2013-03-25 21:33:50 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-03-25 21:33:50 +0100 |
commit | 7b0ba313154e6990fe0d11caa981dc4102193e5e (patch) | |
tree | d9940c0af72b587adc3f0b246dc95e021026d957 /README.md | |
parent | 264c100153fc45cedf94a8cc8a0174fae12e1fe8 (diff) | |
download | svg.js-7b0ba313154e6990fe0d11caa981dc4102193e5e.tar.gz svg.js-7b0ba313154e6990fe0d11caa981dc4102193e5e.zip |
Updated README
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -165,6 +165,15 @@ var path = draw.path('M10,20L30,40') For more details on path data strings, please refer to the SVG documentation: http://www.w3.org/TR/SVG/paths.html#PathData +Note that paths will always be positioned at x=0, y=0 on creation. This is to make the unified `move()` api possible. Svg.js assumes you are creating a path to move it afterwards. If you need to constantly update your path you probably don't want to use the `move()` method at all. In that case you can create an "unbiased" path like so: + +```javascript +// path('path data', unbiased) +var path = draw.path('M10,20L30,40', true) +``` + +This logic is also applicable to polylines and polygons. + ### Image When creating images the `width` and `height` values should be defined: |