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 › length of a text string in pixels
Page Index Toggle Pages: 1
length of a text string in pixels? (Read 370 times)
length of a text string in pixels?
Aug 2nd, 2006, 8:43pm
 
Hi all,

I would like to return into a variable how long a text string is - is that possible?
Or do I have to write the text within a defined area - a rectangle that I know the length of?

What would be the best way to go?

annemarie
Re: length of a text string in pixels?
Reply #1 - Aug 2nd, 2006, 11:36pm
 
I believe textWidth() is what you're looking for...

cheers,
neil
Page Index Toggle Pages: 1