From: wout Date: Mon, 17 Dec 2012 20:59:07 +0000 (+0100) Subject: Updated readme X-Git-Tag: 0.1~20 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=65ed9894618ad6b262c91f2b425461643484ab08;p=svg.js.git Updated readme --- diff --git a/README.md b/README.md index 2a6d204..bf65f01 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,25 @@ rect.size(200, 300); Same as with 'move()' the size of an element could be set by using 'attr()'. But because every type of element is handles its size differently the 'size()' function is much more convenient. +#### Fill +The 'fill()' function is a pretty alternative to the 'attr()' method: +```javascript +rect.fill({ color: '#f06', opacity: 0.6 }); +``` + +#### Stroke +The 'stroke()' function is similar to 'fill()': +```javascript +rect.stroke({ color: '#f06', opacity: 0.6, width: 5 }); +``` + +#### Removing elements +Pretty straightforward: +```javascript +rect.remove(); +``` + + ### Path element ```javascript