Are SVG pictures fast in JUCE?

I need a large number of scalable buttons with pictures on them.
I prefer to use SVG pictures so that I can use a SVG editor.
Is SVG support good in JUCE? Is it fast?
Or is is much better to use DrawablePath for the pictures? In that case I could use the SVG Path Converter. But I do not prefer that route.

IME JUCE’s SVG support is very good - it supports more than the Tiny SVG Specification which is more than some dedicated APIs like ThorVG.

I was playing around with resvg recently which is an SVG renderer written in Rust and uses their custom tiny-skia engine. I found that JUCE out-performed resvg by quite a significant margin, which is impressive given it’s only a small subset of the whole JUCE framework.

So short answer is yes, using SVG’s for graphics in JUCE is not a bad idea at all.

1 Like

I’ve produced some plugin UI’s only from SVG files and I can confirm it is a good choice. I haven’t noticed any significant delays when comparing them to JUCE native widgets. In the worse case scenario, if it is a very big UI, you may want to optimize when some parts are loaded (hidden components and animations).

Good to know that SVG support is good!
Unfortunately there are no examples in the demo files (as far as I know).
Any recent example available somewhere?

There’s an SVG demo in the demo runner: JUCE/examples/GUI/GraphicsDemo.h at a8ae6edda6d3be78a139ec5e429dc57ef047e82a · juce-framework/JUCE · GitHub

Ah, Thx! Didn’t know you can select the picture type at the right of the screen in the GUI->GraphicsDemo. Never to late to learn :wink:

1 Like