diff options
author | wout <wout@impinc.co.uk> | 2014-06-25 15:08:09 +0200 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-06-25 15:08:09 +0200 |
commit | 566407cb328263f1bf155401015da5f269d3dcb7 (patch) | |
tree | b7019950bb4f077853d39ba5a9d2cf9c01fce50d /README.md | |
parent | e567c774c17e6649041d4972defd1232ab602012 (diff) | |
download | svg.js-566407cb328263f1bf155401015da5f269d3dcb7.tar.gz svg.js-566407cb328263f1bf155401015da5f269d3dcb7.zip |
Updated README
Diffstat (limited to 'README.md')
-rwxr-xr-x | README.md | 27 |
1 files changed, 12 insertions, 15 deletions
@@ -207,45 +207,42 @@ rect.radius(10, 20) __`returns`: `itself`__ - -## Ellipse -Ellipses, like rects, have two arguments, their `width` and `height`: +## Circle +The only argument necessary for a circle is the diameter: ```javascript -var ellipse = draw.ellipse(200, 100) +var circle = draw.circle(100) ``` -__`returns`: `SVG.Ellipse`__ +__`returns`: `SVG.Circle`__ -_Javascript inheritance stack: `SVG.Ellipse` < `SVG.Shape` < `SVG.Element`_ +_Javascript inheritance stack: `SVG.Circle` < `SVG.Shape` < `SVG.Element`_ ### radius() -Ellipses can also be redefined by their radii: +Circles can also be redefined by their radius: ```javascript -rect.radius(75, 50) +rect.radius(75) ``` __`returns`: `itself`__ -## Circle -The only argument necessary for a circle is the diameter: +## Ellipse +Ellipses, like rects, have two arguments, their `width` and `height`: ```javascript -var circle = draw.circle(100) +var ellipse = draw.ellipse(200, 100) ``` __`returns`: `SVG.Ellipse`__ _Javascript inheritance stack: `SVG.Ellipse` < `SVG.Shape` < `SVG.Element`_ -_Note that this generates an `<ellipse>` element instead of a `<circle>`. This choice has been made to keep the size of the library down._ - ### radius() -Circles can also be redefined by their radius: +Ellipses can also be redefined by their radii: ```javascript -rect.radius(75) +rect.radius(75, 50) ``` __`returns`: `itself`__ |