Parsing SVG shapes
in
Programming Questions
•
2 years ago
I am trying to parse an svg shape that i created in illustrator using loadShape, and then get.Child. I want to be able to change the colors of the shapes with in the program. Bu I dont understand how to name a shape. As far as I know, my shapes don't have names for me to call out to get the child. What if there's only one shape in the file and i just want to get that one. i think i am missing a key piece of information.
this is the example they give:
this is the example they give:
PShape states;
PShape ohio;
states = loadShape("tristate.svg");
ohio = states.getChild("OH");
smooth();
background(0);
shape(states, -48, 5);
ohio.disableStyle();
fill(102, 0, 0);
shape(ohio, -48, 5);
what i don't understand is what is "OH"?
Thank you!
1