SFML community forums
Help => General => Topic started by: Aldasa on April 22, 2012, 12:46:32 am
-
How can I load use SVG images with sfml?
Ive tried the snippet in the WIKI, using cairo, but I get a lot of linking errors.
Has anybody tried loading SVG images recently? Whats the best way to go about it?
-
SFML doesn't support the SVG format, so using another library is the only solution.
-
But it would be a nice feature, because it would save a lot of diskspace.
If I only need one SVG (which is also very easy to compress) instead of a lot of png files or one big and scale it.
But I think this is a lot of work.
-
Parsing svg files is quite difficult and it has been asked many times on here. Yes it would be handy and it IS technically in the realm of multimedia but as I mentioned I don't believe it's as simple as JPEG/png support.
-
Parsing the SVG format is one thing, rendering vector graphics is another story...
-
But it would be a nice feature, because it would save a lot of diskspace.
Besides disk space not being a critical resource nowadays, I don't think game graphics are a good example of a format that would benefit of vector graphics. With their extreme detail and heavy use of colors, shades, gradients etc., game graphics are usually better represented as raster graphics.