Drawing SVG images in wxWidgets


Question

I need to be able to draw SVG images (with the ability to scale, and rotate the images by 90,180 and 270 degrees).

I also want the ability of instead of rendering the images to a bitmap (e.g. for displaying), to be able to draw them into a new SVG image (exporting the "document" to SVG).

wxWidgets does not seem to have any built in SVG capabilities, so I'm not sure how to proceed on adding such functionality.

1
6
12/17/2009 1:38:41 PM

The cairo library website has examples on drawing SVG using librsvg.

Both the cairo and librsvg libraries should be sufficiently cross-platform to do what you need, and with wxcairo it should be possible to dock them onto wxWidgets.

That is the first idea I would research when faced with the task of drawing SVG into wxWidgets.

Also, drawing to SVG files with cairo is quite easy when you are doing all your drawing with cairo anyway, and the drawing model cairo uses is quite similar to SVG.

5
12/24/2009 4:44:36 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon