Display SVG Image

Sorry if this is a noob question - just getting started. I’ve got an existing svg image that consists of lots of different odd shapes. I want to be able to display that svg and also be able to pinch zoom in/out, scroll, and perform hit tests on some of the shapes that are displayed.

I think I can do all the latter parts, but I’m just not sure what’s the best way to load and display the svg using Corona, such that the path/vector data is also available for point-in-polygon hit tests. Any suggestions/ideas/pointers would be much appreciated. [import]uid: 102773 topic_id: 17479 reply_id: 317479[/import]

@Zainny Did you find a way to implement this? 11 years later and I am trying to do the exact same thing but have difficulties getting something going. I can display (some) svg files using nanoSvg newImage/newTexture. I have also looked at these two methods in the documentation and based on how they are parsed I don’t think information is retained to do a point-in-polygon hit test.

@vlads I have made some assumptions, and correct me if I am wrong, but is what Zainny and myself trying to achieve possible in Solar2D? In my case I want to display an svg and change the color of various parts of it. Any advice would be greatly appreciated, thanks.

I imagine nanoSvg is probably pretty frozen, but @devex’s extensions include scalable textures based on SVG.

@StarCrunch Looks promising, I will check it out. Thanks!