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 › getting strokeWeight
Page Index Toggle Pages: 1
getting strokeWeight? (Read 500 times)
getting strokeWeight?
Jul 6th, 2008, 1:06am
 
is there a way to get the current strokeWeight?

i suppose this is a general q for many other params...

thanks,
e
Re: getting strokeWeight?
Reply #1 - Jul 6th, 2008, 2:56am
 
hello

as a workaround, you can do something like that:
Code:
//local save of the weight
float nStrokeWeight=1
//then a method that wraps the processing strokeWeight
void _strokeWeight(float n)
{
nStrokeWeight=n;
strokeWeight(n);
}
//and then access the strokeWeight
float getStrokeWeight()
{
return nStrokeWeight;
}

or access it directly.
Re: getting strokeWeight?
Reply #2 - Jul 6th, 2008, 8:28am
 
sorry;

what's the option w/r/t "accessing it directly"?
i like your workaround, btw.

e
Re: getting strokeWeight?
Reply #3 - Jul 6th, 2008, 2:06pm
 
You can get it with g.strokeWeight read-only variable.
Page Index Toggle Pages: 1