The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL + SVG
Bill Kendrick
Guest

I did a short talk about using libRSVG and Cairo to render SVG images
(Scalable Vector Graphics, an open format for vector imagery) into SDL
surfaces at the SVGOpen 2009 conference in Mountain View, Calif. yesterday.

My talk includes 3 or 4 slides with the bare-bones bits of code I use
in Tux Paint (my drawing program for kids), which folks out here might
be interested in seeing.

Slides in PDF format are here:

http://tuxpaint.org/presentations/sdl_svg_svgopen2009_kendrick.pdf

Tux Paint is GPL, but I believe I'm 100% responsible for the SVG-loading
code in Tux Paint[1], and I'd love it if someone out there assembled it
into a flexible LGPL-licensed library for SDL[2], or perhaps added it to
SDL_image[3].


Enjoy!

[1] There are actually two variations: one using libSVG, Cairo and svg-cairo,
which I guess are deprecated, but which Tux Paint uses on older platforms,
and one using libRSVG and Cairo, which is what Tux Paint uses on 'modern'
platforms (and which renders the SVGs more correctly).

[2] There has been at least one SDL+SVG library in the past, but I had
trouble using it, or something, which is why I ended up rolling my own (twice!)

[3] Keeping in mind that libRSVG depends on a lot of other libraries. Smile

--
-bill!
Sent from my computer
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL + SVG
bugs buggy
Guest

On 10/4/09, Bill Kendrick wrote:
Quote:
[1] There are actually two variations: one using libSVG, Cairo and svg-cairo,
which I guess are deprecated, but which Tux Paint uses on older platforms,
and one using libRSVG and Cairo, which is what Tux Paint uses on 'modern'
platforms (and which renders the SVGs more correctly).

[2] There has been at least one SDL+SVG library in the past, but I had
trouble using it, or something, which is why I ended up rolling my own (twice!)

[3] Keeping in mind that libRSVG depends on a lot of other libraries. Smile


I was looking for SVG support as well, but as you noted in point 1,
that is deprecated, and point 3, that is just too many other libs, and
a huge PITA to get it to work on MSVC compilers.

Have you seen/used ShivaVG http://sourceforge.net/projects/shivavg/ ?
I am just curious as to what you have tried before, so I don't fall in
the same holes you did. Smile
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL + SVG
Bill Kendrick
Guest

On Mon, Oct 05, 2009 at 12:01:28AM -0400, bugs buggy wrote:
Quote:
Have you seen/used ShivaVG http://sourceforge.net/projects/shivavg/ ?
I am just curious as to what you have tried before, so I don't fall in
the same holes you did. Smile

I hadn't seen this. However, since I'm not using OpenGL in any way
(and don't want that kind of dependency in Tux Paint), this isn't suitable. Smile

libRSVG is a pain in the butt, but we did get it working on multiple platforms
(Windows XP/2000/Vista/7, Mac OS X, modern Linux distros).

We fall-back to svg-cairo on older platforms (Win95/98/ME, older Linux
distros), or fall back even further to "no SVG support" (on ancient Linux
distros).

--
-bill!
Sent from my computer
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org