Can we handle mouse events for a piece of SVG
frink opened this issue · 1 comments
frink commented
Want to be able to build the interface in SVG and bind events intervally...
lieff commented
Currently SVG is undivided piece on vector graphics and should be presented manually using lvgShapeDraw and mouse events should be obtained from lvgGetParams, like here:
https://github.com/lieff/lvg/blob/master/samples/simple_svg/main.c
Theoretically script (or just code without script) can access points from LVGShapeCollection structure and build two shapes from one. But currently we must know what shape or points to divide, no meta information is read by NanoSVG and present in LVGShapeCollection structure. So more easy way is to just split one svg to two by some tool/painting program.