We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am writing a sketch where I must be able to load an SVG, access its children, get shape fill colors and change them on a new PShape. The new PShape would be the same as the original PShape with fill colors changed.
From what I have seen in forums and documentation, presently there is no way to duplicate a PShape, so I am loading the same SVG twice ( in = loadShape("shape.svg"); out = loadShape("shape.svg");).
After that I iterate through each in.getChild, find out the family, and if it has children, iterate again.
My problem is that I have to find out the fill color for PRIMITIVE / PATH / GEOMETRY families. The only method I can find is getFill(int index) (http://www.processing.org/reference/javadoc/core/processing/core/PShape.html#getFill(int)), but there is no documentation. I may be wrong, but it seems to me that a method getFill() with no parameters to get the fill color of the current shape would be more helpful than getFill(int Index). But then again, I may have totally missed the point of the "index" parameter.
A similar question has been asked here: http://forum.processing.org/one/topic/pshape-getfill.html
I apologize for double posting, but the question I am referring has no answers, and I really need to find a way to do this.
Thanks in advance for your help.