[cairo] Converting SVG images to PNG

Chad J chadj at postboredom.org
Mon Aug 25 17:57:32 PDT 2008

Hello Everyone,

First some backstory:
I'm developing a game.  It's going to be a 2d game.  I'd like to use SVG 
in it since SVG scales nicely to a wide range of resolutions without 
losing detail, and the ability to zoom in and out on sprites without 
losing detail is quite nice.  Also, SVGs can be made easily with 
Inkscape.  It needs to run on both Windows and Linux at least, hopefully 
Mac OS (Intel) too.

What I'd like to be able to do:
I want to be able to render or convert SVG images into a more convenient 
format to work with internally, like a texture with raw pixel data that 
can be drawn.  Note also that the game needs to ship with everything it 
needs to run (within reason), so that the player's first experience 
isn't tracking down dependencies. 

Now, it seems that Cairo can write to SVG format as is, but drawing from 
SVG requires rsvg.  Now, rsvg is a bit troubling since it has gnome 
dependencies, a website a few years and versions outdated, and little 
documentation.  I'd rather not use it.  So, is there still some way to 
use Cairo to accomplish these goals?

Thanks in advance,
- Chad

More information about the cairo mailing list