From 65ed9894618ad6b262c91f2b425461643484ab08 Mon Sep 17 00:00:00 2001 From: wout Date: Mon, 17 Dec 2012 21:59:07 +0100 Subject: [PATCH] Updated readme --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 -- 2.39.5