UseSVGImageDecoder/Encoder

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
idle
Always Here
Always Here
Posts: 5964
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: UseSVGImageDecoder/Encoder

Post 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
punak
Enthusiast
Enthusiast
Posts: 106
Joined: Tue Sep 07, 2021 12:08 pm

Re: UseSVGImageDecoder/Encoder

Post 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.
acreis
Enthusiast
Enthusiast
Posts: 220
Joined: Fri Jun 01, 2012 12:20 am

Re: UseSVGImageDecoder/Encoder

Post 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.
User avatar
idle
Always Here
Always Here
Posts: 5964
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: UseSVGImageDecoder/Encoder

Post 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.
acreis
Enthusiast
Enthusiast
Posts: 220
Joined: Fri Jun 01, 2012 12:20 am

Re: UseSVGImageDecoder/Encoder

Post by acreis »

Well I only can say thank you very much!
User avatar
idle
Always Here
Always Here
Posts: 5964
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: UseSVGImageDecoder/Encoder

Post 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
Post Reply