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 & HelpSyntax Questions › Changing color of a graphic
Page Index Toggle Pages: 1
Changing color of a graphic (Read 615 times)
Changing color of a graphic
May 17th, 2009, 7:12am
 
so, i tried to search for it, but didn't found anything! what i want to know is if it's possible to import a SVG graphic and then change its color in processing, or make it randomly generated?
Re: Changing color of a graphic
Reply #1 - May 17th, 2009, 7:47am
 
you can...

shapename.disableStyle();
and then use fill/stroke like you are used to...
Re: Changing color of a graphic
Reply #2 - May 17th, 2009, 9:34pm
 
I have to say, it seems like processing's support for SVG is pretty poor. I tried using an svg that contained an ellipse, and processing said that shape wasn't supported.

anyone else have issues with this?
Re: Changing color of a graphic
Reply #3 - May 17th, 2009, 10:43pm
 
i loaded an svg i downloaded somewhere and had some similar problems, it says some kind of circle is not supported, maybe thats the same. But i never had problems with any svg i made myself. But sure, there is always room for improvements.
Re: Changing color of a graphic
Reply #4 - May 18th, 2009, 1:10am
 
SVG is a very complex standard, it is hard to support it completely, even in the basic version. I find the current implementation already awesome!
Now, there is room for improvement, the error you probably got means, IIRC, the arc primitive isn't supported yet. It waits for somebody, one of the authors or somebody else with knowledge and free time, to implement it.
Meanwhile, we have to live with the implementation. Or use something like Batik, which weights several MB!
Page Index Toggle Pages: 1