Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×

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.

FORTUNE'S FUN FACTS TO KNOW AND TELL: A giant panda bear is really a member of the racoon family.

Working...