Page 3 of 3

Re: UseSVGImageDecoder/Encoder

Posted: Tue Sep 30, 2025 11:02 am
by idle
acreis wrote: Tue Sep 30, 2025 10:52 am Hi idle,

I made a mistake, plutosvg and nanosvg was rendering some svg as a black shadow only. UseSvgImage is fine. Great to be true, I'm sticking to it to render toolbar and menu icons.
It will hopefully be a bit more flexible and faster than them to on redraws. a few things to work out on the displaylist
and maybe I can get it down to two lines of code to use it for loading an SVGLoad and drawing it SVGDrawtoCanvas
SVGDrarwtoImage SVGDrawtoSprite SVGDrawtoTexture SVGDrawtoMateiral SVGDrawtoWindow

Re: UseSVGImageDecoder/Encoder

Posted: Tue Sep 30, 2025 11:23 am
by punak
It might sound funny, but there’s really no alternative to integrating the powerful Skia library into PureBasic. In my view, it covers a vast portion of what users typically expect from a graphic and vector-based library.
There’s no need to write a parser for SVG from scratch either.

Re: UseSVGImageDecoder/Encoder

Posted: Tue Sep 30, 2025 11:36 am
by acreis
I'm trying to compile skia as a dll since yesterday, but there is a lot of glitches.

By the way when I was younger I rewrite a lot of things from c to purebasic only for fun. Nom I dont have time to it.

Re: UseSVGImageDecoder/Encoder

Posted: Tue Sep 30, 2025 12:28 pm
by idle
I don't see any issue in writing it in pb, The amount of time it would take to import and wrap sika, I could adapt the usesvgmodule a few times over.
Sika is a big lib and unless it has a c lib or the c++ uses pure virtual classes you'd be need to write wrapper functions in c++ to export the classes.

Re: UseSVGImageDecoder/Encoder

Posted: Tue Sep 30, 2025 4:41 pm
by acreis
Well I only can say thank you very much!

Re: UseSVGImageDecoder/Encoder

Posted: Thu Oct 02, 2025 6:05 am
by idle
acreis wrote: Tue Sep 30, 2025 4:41 pm Well I only can say thank you very much!
thanks.
I've done a display list test here and am starting to integrate it into the module
viewtopic.php?p=646022#p646022