Reputation: 1319
I would like to open SVG files, manipulate the shapes defined in those and render those shapes to the screen in windows (vista/7/...).
I work with C++ builder. I've been thinking of using cairo or agg to render the shapes but I need a SVG parser library that provides a renderer and a full access to the shapes defined in the SVG files.
Does anyone know a library I could use to achieve this ?
I can't use Qt for money reason.
Thanks for your help.
Upvotes: 3
Views: 3937
Reputation: 2079
I have recently put together a small SVG renderer library in C++: https://github.com/igagis/svgren
It uses Cairo for rendering to off-screen surface. Supports gradients and all kind of shapes. It uses another my library called svgdom which actually loads and offers a DOM of SVG which can be manipulated before rendering.
Upvotes: 0
Reputation: 1319
The best way to do so, is I think, librsvg with libcairo. Both are very feature rich and easy to use. I can open several SVG, render them to the screen and handle them to scale and move them.
Upvotes: 1
Reputation: 9867
The generic "render SVG to a cairo context" solution is librsvg: https://live.gnome.org/LibRsvg
However, both Qt and librsvg are licensed under LGPL (which does NOT forbid you to use it in commercial products).
Upvotes: 0
Reputation: 1580
The AGG source includes an SVG viewer :-)
Even if you are writing a commercial product the Qt licence should be fine.
Upvotes: 1