The Ashes
Raphaël 1.0 RC; Get your graphics on
There have been a fair number of graphics library abstractions, but Raphaël is very elegant indeed, and a first release candidate for the 1.0 release is now here:
- The
path
method syntax has been changed: Instead ofr.path({attributes}, pathString)
you should writer.path(pathString).attr(attributes)
. That makes path more consistent with other methods;- Path methods moveTo, lineTo, curveTo, etc. are moved from API (in favour of SVG path strings) to external plug-in;
- Path method could access multiple parameters that are placed inside of pathString, e.g.:
r.path("M{0},{1}L{2},{3}", a, b, c, d)
is equal tor.path("M" + a + "," + b + "L" + c + "," + d)
;- Added support for angle in arc. That means Raphaël finally has full support for SVG path;
- Animation from one path to another now is better;
- Add adjusting to primitives so they shift nodes to match a pixel grid;
- Fixed wrong path dimensions in IE & WebKit
- General bugfixes and performance updates;
Dmitry Baranovskiy has a new tutorial gives you a quick walk-through to check out the basics:
Raphaël is a small JavaScript library that should simplify your work with vector graphics on the web. If you want to create your own specific chart or image crop and rotate widget, for example, you can achieve it simply and easily with this library.
Raphaël uses the SVG W3C Recommendation and VML as a base for creating graphics. This means every graphical object you create is also a DOM object, so you can attach JavaScript event handlers or modify them later. Raphaël’s goal is to provide an adapter that will make drawing vector art compatible cross-browser and easy.
Raphaël currently supports Firefox 3.0+, Safari 3.0+, Opera 9.5+ and Internet Explorer 6.0+.
No Comments