aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-05-29 16:42:09 +0100
committerwout <wout@impinc.co.uk>2013-05-29 16:42:09 +0100
commit89b8a38823f41020ee85c6c3882205f07a30f569 (patch)
tree1f77404d3e8ada65b1a164e7e7dc49da6781b4de
parent1f3eeddc4a188d0d9a1b581e2ce32106112bfdfc (diff)
downloadsvg.js-89b8a38823f41020ee85c6c3882205f07a30f569.tar.gz
svg.js-89b8a38823f41020ee85c6c3882205f07a30f569.zip
Updated README
-rw-r--r--README.md20
1 files changed, 18 insertions, 2 deletions
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._