SFML community forums

General => General discussions => Topic started by: louie on October 09, 2016, 10:55:45 am

Title: Is there a way to render SVG files with SFML?
Post by: louie on October 09, 2016, 10:55:45 am
Or is there a library for that stuff that works well alongside SFML?
Title: Re: Is there a way to render SVG files with SFML?
Post by: dabbertorres on October 09, 2016, 11:29:57 am
You could use a svg parsing library like nanosvg (https://github.com/memononen/nanosvg), and then (using the data obtained from parsing) rasterize it to an SFML primitive.

It's relatively straightforward to do. It just needs to be done. ie: The hard part. :)

Otherwise, I don't know of anything that already does so.
Title: Re: Is there a way to render SVG files with SFML?
Post by: louie on October 09, 2016, 11:45:36 am
Thanks, man! I think nanosvg will do just fine :)
Title: Re: Is there a way to render SVG files with SFML?
Post by: korczurekk on October 09, 2016, 12:15:39 pm
I attached my library to draw Bezier Curves in SFML. It wasn't meant to be published, so it lacks documentation, but it's pretty short.