Forgot your password?
typodupeerror

Comment: My SVG Library (Score 2, Interesting) 130

by JM Apocalypse (#28136377) Attached to: Lightweight C++ Library For SVG On Windows?

I've been working on a similar problem in my spare time for quite some time now. I needed a SVG library that was BSD-compatible, could draw any Adobe Illustrator SVG, and selectively enable or disable objects by their ID that was suitable for inclusion in a 3D game.

I couldn't find any library that fit the requirements, so I ended up writing a C++ library called Donner SVG. It is heavily based on librsvg except written with SVG DOM in mind and for minimal dependencies. It's only dependencies are Cairo, rapidxml, and libcroco, but none of libcroco's dependencies as I wrote a compatibility layer. Additionally, the renderer can be easily swapped out to eliminate the Cairo requirement.

Some notable features:
- Ability to access the SVG document tree and modify it after loading an SVG.
- Supports all shapes and paint server types (radial and linear gradients with stops, solid colors, and transparency).
- CSS2 selector support.
- Bounding box calculation.

It renders static SVGs very well, but I don't consider it to be releasable yet. My goal is to fully implement the #SVG-static feature string and use the library to implement a SVG extension for skeletal animation and inverse kinematics.

I'm willing to send a copy of the source over if anyone is interested, just contact me at "donner (at) jeffrules (dot) com". It is licensed under the LGPL as parts of it are borrowed from librsvg.

"Pull the trigger and you're garbage." -- Lady Blue

Working...