Kore Nordmann - PHP / Projects / Politics ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Author: Kore Nordmann :Date: Mon, 16 Jun 2008 11:42:06 +0200 :Revision: 1 :Copyright: CC by-sa ======================================= New features in eZ Components Graph 1.3 ======================================= :Description: There are some interesting new features in the driver part of the graph component of the eZ components - one thing I even thought is "impossible" until some external submission... The drivers in the graph component are called by the renderers and transform image primitives, like a rectangle, circle, or similar, into actual images. The graph component currently supports Flash, GD, SVG and - since this release - Cairo drivers. Cairo driver ============ Cairo is a software library used to provide a vector graphics-based, device-independent API for software developers. It is designed to provide primitives for 2-dimensional drawing across a number of different backends. Cairo is designed to use hardware acceleration when available. .. Wikipedia Cairo is currently one of the fastest and best 2D drawing libraries, used by Gnome, Firefox 3 and may others to render high quality graphics. Cairo is also available in PHP through the `pecl/cairo_wrapper`__ by `Hartmut`__ and now also in the graph component by the new driver ezcGraphCairoDriver__. As `shown earlier`__ cairo is the fastest rendering tool in PHP, and produces the best output. It supports everything we need in graph, like (transparent) gradients, perfect anti aliasing and different fonts. Even the extension it depends on is still beta you should definitely give it a try. __ http://pecl.php.net/package/cairo_wrapper __ http://cairo-wrapper.php-baustelle.de/trac/ __ http://ezcomponents.org/docs/api/trunk/Graph/ezcGraphCairoDriver.html __ http://kore-nordmann.de/blog/comparison_of_php_image_libraries_update.html SVG driver ========== Thanks to Freddie Witherden we now got support for glyphs in SVG. Glyphs are used in the `SVG driver`__ to provide paths for characters. This allows us to finally estimate the exact space consumed by texts which is a really great enhancement for the SVG support in the graph component. To use this feature, you just need to assign a SVG font, instead of just a name of a font. In case of a font name, the client actually renders the text, and this depends a lot on the actual client so we weren't able to exactly estimate where the text will end up. The SVG font may be created using ttf2svg from `apache batik`__, which basically converts all characters defined in a TTF font into paths, which then can be embedded in the created SVG document. __ http://ezcomponents.org/docs/tutorials/Graph#svg-driver __ http://xml.apache.org/batik/ Subsumption =========== As a result the Cairo and SVG driver now support everything you need to generate perfect and beautiful charts. Both features are available in the latest stable release, which has `just been announced`__. __ http://ezcomponents.org/resources/news/news-2008-06-16 Trackbacks ========== Comments ========