Posted By: wraggster
News/release from qw3rky
Anti-Grain Geometry is an awesome library for software rendering of 2D vector graphics (see here). As soon as I saw it, I wanted to get it running on the DS. The full library is a bit large and uses lots of floating point, which is kind of a problem. But there is a cut-down version called AGG Lite which fits perfectly well on the DS. I downloaded the code, did some massive reorganization (the AGG author's code was far too messy for my taste), cut out any remaining floating point usage, and added a color format class specifically for the DS, and the result is pretty nice. You can check out my open-source clean-up effort at
http://brian.grogan.jr.googlepages.com/agg_lite_ds.zip. Compare with the original.
After I whipped AGG Lite into shape, I thought to myself, "wouldn't this go so nicely with that small, fast XML library (Mini-XML) I found a few months ago?" (download pre-compiled for DS) So I put the two together to come up with a totally alpha quality SVG renderer.
It only handles a minuscule subset of the SVG specification (the rect element), so ... now you can draw rectangles ... with SVG!? It's not much yet, but I'm a follower of the agile development principle, "get something simple working fast." I'll put some more work into this to support other SVG elements later on, but for now, you can render trivial SVG on the DS.
This uses libfat to load the SVG files, so of course remember to dldi patch the nds file before using. And if you want to build from source you'll need the Mini-XML and AGG Lite libraries posted in the project links above.
download:
http://brian.grogan.jr.googlepages.com/agg_svg.zip