mgraphics in_fill and svg

    Jul 11 2012 | 10:23 pm
    I'm trying to use in_fill to detect mouseover and hover events on a rendered SVG graphic. is it possible? I'm modifying the UseSVG patch from Darwin to try it out, and no luck with: with (mgraphics) { // draw the center save(); translate(.0, .45); mgraphics.svg_render("ring.svg"); var ovah = mgraphics.in_fill(loc); post("nover",ovah); restore() ...etc... } I always get 0 for the "ovah". Is there a way I can do this?

    • Jul 12 2012 | 6:19 pm
      Hi Peter,
      I believe in_fill only works for the current path. To do what you want to do, you would probably have to get the size of the svg as well as the location of it, then compare it to the mouse's current position.