We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › Load and do stuff with a SVG file
Page Index Toggle Pages: 1
Load and do stuff with a SVG file (Read 1850 times)
Load and do stuff with a SVG file
Apr 15th, 2009, 2:24pm
 
Hello there,
I am looking for a way to import a SVG file, a vector map of Europe. I need to dynamically display different statistics, like population and Internet users, throughout the last decade. I had this idea that I could hover a country with the mouse pointer and it would display detailed information.
So, do you think this is the right approach? I tried the Candy library but it won't import since there is an "array index out of bounds error".
I don't have Adobe Illustrator, so would anyone kindly point out a svg that loads successfully? Maybe I can manually remove some unsupported information from my EU svg, which, if anyone is interested, is here: hxxp://cid-ca3c3744bcf7fb54.skydrive.live.com/self.aspx/Javno/europe.svg 
(fix to http since the board doesn't let me paste urls)
If I get it to work, is it possible to for example change color of a country, and similar stuff?  Smiley
Re: Load and do stuff with a SVG file
Reply #1 - Apr 15th, 2009, 3:28pm
 
In recent Processing versions, we no longer use Candy, because SVG support is built in (well, technically, the built in SVG support uses Candy, but it is no longer shipped as separated jar, it is in core.jar).

SVG support is not perfect, though. Inkscape support has improved, but might be imperfect.
If you search the forum, you might find a number of similar projects.
Page Index Toggle Pages: 1