SVG <defs> support?

Am I right to assume that <defs> are not supported in the SVG parser?

I’m using a slightly older version of JUCE. Maybe they are supported in version 6?

They’re definitely supported, at least for css classes and clip paths.

1 Like

Thanks @yairadix Good to know. Must be the older version of JUCE that is the problem. I’m on the last iteration of JUCE 5.

If you need to stay on 5, note that some of these features were probably first available on SR’s branch before they were in official JUCE, also back when it was based on JUCE 4/5

2 Likes

Am I to assume that these changes did eventually make it to the main JUCE repo?

They did, diffing our modules/juce_gui_basics/drawables/juce_SVGParser.cpp from main JUCE, our differences our small, only some fix for paths with transforms and some work-arounds for paths that include dots which Illustrator may export.

1 Like

Now I’m wondering whether or not I can use elements of juce_SVGParser from the SR branch in a product that uses a licensed version of JUCE 5? :exploding_head: I guess not right?

If you use a commit that predates merging with JUCE 6 then you should be covered. It’s SR’s fixes/contributions and you’re welcome to use them granted you can use the underlying JUCE version. Again just as long as the changes come before the merges with JUCE 6.

That’s great. I do plan to move to JUCE6 as some point, but it’s nice to know I can at least avail of this now :wink: