[SDL] Best approach to Rendering Vector Graphics with SDL?

LM lmemsm at gmail.com
Wed Mar 13 04:21:09 PDT 2013

bazz wrote:
>1. What is so great about vector art?

Supposedly faster more efficient downloads for browsers (if you're
displaying via the web).  However, not all browsers support it.  As to
vector formats, IE used VML for a long time.  It's finally switching
to the W3C standard.  W3C promotes SVG.  Xfig format has been around
for a long time (longer than SVG) and is mainly used by applications
on a system.  Haven't seen much if any web use of Xfig format.

>2. How come I can't find anything on Displaying Vector Art with SDL??
>- - Something as useful as this sounds to be begging for association with SDL.... I mean ya I
>found some screwy libSVG library from 2008 or so.. but something so outdated I will prefer to
>stay away from. I am hoping for better answers/advice.

I thought the SDL_svg library ( http://www.linuxmotors.com/SDL_svg/ )
looked promising.  I'm not particular about whether something's
currently supported or not.  Most Open Source programs I've run across
use libRSVG.  (Here's a note about it with Tux Paint:
 I wasn't particularly thrilled with this approach because it brings
in a lot of dependencies which I'm not otherwise using on my system.
You could look into xfig/winfig, transfig, netpbm options and store
graphics in vector format for space concerns, but convert to bitmap
before drawing.

One other link I thought was interesting:
It's a SVG editor in a browser.

Speaking of browsers, netsurf is a lightweight browser that supports,
among other things, SDL display.  You may want to check out how
they're adding SVG support to their browser:
It's an active project if that's what you're looking for.

> I don't know much about vector graphic file formats. The benefits behind each one, or why cell phones are using a different SVG format, i think it's called tiny SVG?? (not sure, time is short)

Phones are using a subset of SVG (partly for speed and partly for
compatibility).  It's basically the same format, just not all the

>This is still rough in the dome. So I am really looking for answers. Can anyone help me out? >Once again, I'm just trying to open up this treasure chest of universal screen support

Hopefully, I've given you a few ideas.  Would be interested to hear if
you turn up any other useful resources for vector graphics.


More information about the SDL mailing list