From: wout Date: Wed, 29 May 2013 15:42:09 +0000 (+0100) Subject: Updated README X-Git-Tag: 0.18~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=89b8a38823f41020ee85c6c3882205f07a30f569;p=svg.js.git Updated README --- diff --git a/README.md b/README.md index 207eff3..75241e2 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ As an alternative an array of points will work as well: ```javascript // polyline([[x,y], [x,y], [x,y]]) -var polyline = draw.polyline([[0,0], [100,50], [50,100]]) +var polyline = draw.polyline([[0,0], [100,50], [50,100]]).fill('none').stroke({ width: 1 }) ``` @@ -232,7 +232,7 @@ If you want to get an element created by svg.js by its id, you can use the `SVG. ```javascript var element = SVG.get('my_element') -element.fill('#f06) +element.fill('#f06') ``` @@ -704,6 +704,22 @@ The `skew()` method will take an `x` and `y` value: rect.skew(0, 45) ``` +### Scale +The `scale()` method will take an `x` and `y` value: + +```javascript +// scale(x, y) +rect.scale(0.5, -1) +``` + +### Translate +The `translate()` method will take an `x` and `y` value: + +```javascript +// translate(x, y) +rect.translate(0.5, -1) +``` + _This functionality requires the sugar.js module which is included in the default distribution._