Ignore hits on transparent parts of the image
It seems the entire rectangle of the RenderVectorGraphic absorbs hits (for example when a user taps the screen).
Would it be possible to adjust the hitTestSelf to only return true if the hit is on a non-transparent part of the SVG?
That would be expensive and probably not quite the desired behavior in a lot of cases.
Imagine, for example, you have an icon you're painting on a button - you don't want to do expensive hit testing logic to see if the hit falls within some complicated path describing the outline of the icon just to end up getting a hit on the button "under" it...
Oh absolutely, it's not desirable for every use case. Maybe I should have framed it as "Could you make it optional" to ignore hits in the transparent parts of the SVG.
In my use case, I have a circular button drawn as a SVG, and with the current hit test you can hit outside of the bounds of what's visible, which is undesirable.
I suspect the work around, is for me calculating a mask and implementing my own "hit test" on top of the SVG.