From: wout Date: Sun, 24 Mar 2013 18:50:07 +0000 (+0100) Subject: Updated README X-Git-Tag: 0.12~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=20e9f674cb11d0f856baf7e05517cbebda31fdb8;p=svg.js.git Updated README --- diff --git a/README.md b/README.md index 25cf24e..85d3908 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,13 @@ var polyline = draw.polyline('10,20 30,40 50,60') Polyline strings consist of a list of points separated by spaces: `x,y x,y x,y`. +As an alternative an array of points will work as well: + +```javascript +// polyline([[x,y], [x,y], [x,y]]) +var polyline = draw.polyline([[10,20], [30,40], [50,60]]) +``` + ### Polygon The polygon element, unlike the polyline element, defines a closed shape consisting of a set of connected straight line segments: