I have filters working inside <g> elements with clip-paths.
<g ref="backSphere" id="backSphere"></g>
<g style="clip-path: url(#clip)">
<use xlink:href="#backSphere" style="filter: url(#blur)"></use>
</g>
Is there a simple way to "invert" this, so that the filters effectively apply to everything "outside" the clip path?
My current use case is a rectangle, but a more general answer would also be appreciated.
I know I can, for the most part:
- Cover the entire SVG with one filter, then try to calculate the inverses for the applied filters with another: not ideal because of calculations, probably double-filter performance hits, and it might not math out precisely.
- Create a piecemeal set of filter elements to patchwork in the coverage around the shape I want: not ideal because of individual positioning, and with either movement or more complex shapes this would be a bear.