diff options
author | wout <wout@impinc.co.uk> | 2013-02-02 17:34:25 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-02-02 17:34:25 +0100 |
commit | ec56136a1a3cd83f856723d1076536e550296e31 (patch) | |
tree | 6031877fba4ada024a917947532245a0e979615c /README.md | |
parent | 1c9b6af19cd1367a74b91cb88e98ec1bef2d8234 (diff) | |
download | svg.js-ec56136a1a3cd83f856723d1076536e550296e31.tar.gz svg.js-ec56136a1a3cd83f856723d1076536e550296e31.zip |
Added SVG.Line as a native element0.5
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -61,6 +61,14 @@ var circle = draw.circle(100); _Note that this generates an `<ellipse>` element instead of a `<circle>`. This choice has been made to keep the size of the library down._ +### Line +The line element always takes four arguments, `x1`, `y1`, `x2` and `y2`: + +```javascript +var star = draw.line(0, 0, 100, 150); +``` + + ### Polyline The polyline element defines a set of connected straight line segments. Typically, polyline elements define open shapes: @@ -71,8 +79,6 @@ 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`. -_Not unlike the `<circle>` element, the svg `<line>` element has not been implemented to keep the library as small as possible. Therefore you might want to use the `polyline()` method to create a single line segment._ - ### Polygon The polygon element, unlike the polyline element, defines a closed shape consisting of a set of connected straight line segments: |