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.
Page Index Toggle Pages: 1
SVG Section out of date? (Read 1637 times)
SVG Section out of date?
Dec 12th, 2009, 3:40pm
 
I'm going through Chapter 10 of the book (Visualizing Data), page 320 on SVG and it references the library "processing.candy.*" but on the main processing site it says that "candy" was incorporated into the core and references "PShape" as the class to use.

Problem is the 2nd program in the SVG section. It loads the SVG Map of the USA and colors states in a manner analogous to chapter 3. However, there are some SVG methods (SVG is a class in candy) that do not appear to be present in PShape. Specifically svg.get(String), which seems to read a part of the SVG file scanning for String and just returns that "sub-shape".

Thing is, this seems like quite a useful thing to have. Is something like it available in the current release? I'd rather not write my own, or hand edit the main US map file extracting each state into it's own file, but if I need to I will.

Thanks in advance!

Mike
Re: SVG Section out of date?
Reply #1 - Dec 12th, 2009, 4:10pm
 
Well... I can't answer if it's out of date or not (guessing yes) but the method that replaces SVG's "get()" is PShape's "getChild()".

So I'm good. Thanks

Re: SVG Section out of date?
Reply #2 - Jan 20th, 2010, 1:40pm
 
Yes, that's correct. Sorry for the confusion. Slowly working on an updated version of the book (if not just the examples).
Page Index Toggle Pages: 1