melatonin_blur icon indicating copy to clipboard operation
melatonin_blur copied to clipboard

Investigate SVG shadows

Open sudara opened this issue 2 years ago • 1 comments

sudara avatar Nov 08 '23 15:11 sudara

A few issues with this:

  • Drawable::createFromSVG produces a DrawableComposite — and from there there's no way to directly get at a juce::Path.
  • SVGs can be made out of many paths, each one will actually be its own Drawable in JUCE
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18 4H6" stroke="black" stroke-width="2"/>
<path d="M18 8H6" stroke="black" stroke-width="2"/>
<path d="M18 12H6" stroke="black" stroke-width="2"/>
<path d="M18 16H6" stroke="black" stroke-width="2"/>
<path d="M18 20H6" stroke="black" stroke-width="2"/>
</svg>

So probably the answer is to "flatten" the svg to a single color image with alpha and then blur that...

sudara avatar Mar 27 '24 13:03 sudara