1
General discussions / Re: Limited SVG support - SVGTexture
« on: February 10, 2016, 08:53:37 pm »goto error;Agreed, it's a bad habit to mix in C-style error handling when RAII is available; now it's fixed.
Manual memory management with malloc and free is a no-no in C++, obviously...Yup, fixed that too.
Quote
And the inheritance from sf::Texture is also a little worrying.Yes, good point. I've removed inheritance and made load function static. Or maybe it will be even better to make it free function, like
There's no need for it.
bool loadTextureFromSvgFile (Texture& targetTexture, const std::string & filename,
const std::string & units = "px", float dpi = 96.0f);
?const std::string & units = "px", float dpi = 96.0f);
Quote
I think I'd enjoy a way to get a triangle strip vertex array with right colors and all more than just rasterizing but I have no idea if that's possible with that nanosvg library.Well, I've managed to get at least lines strip vertex array using nanosvg, so I have to think about that.
Quote
I mean, If I want to just rasterize an SVG I can do it offlineYes, I know, but topics about SVG support appear time to time at forum, so I've decided to make some start