FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   drawString?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: drawString?  (Read 224 times)
william

WWW Email
drawString?
« on: Apr 6th, 2004, 7:49pm »

Hi,
Just wondering if there's processing version of "Graphics.drawString()" method... it could be quite useful for debugging and tracing variables, without the need to load any fonts first.
 
 
TomC

WWW
Re: drawString?
« Reply #1 on: Apr 6th, 2004, 8:52pm »

You want "print" or "println" - anything you send to them will appear on the console.
 
They are vulnerable to sluggish behaviour if you send lots of stuff every frame, but they are handy for status messages.  Just don't try and output the colour of every pixel, every frame, like I did
 
Something I find useful is to use a lower frame rate whilst printing info to the console, then you know what's going on.  framerate(2) sets loop to 2 frames per second.
 
fry


WWW
Re: drawString?
« Reply #2 on: Apr 7th, 2004, 6:52pm »

also, java's Graphics.drawString() is just called 'text()' in processing. but println() will be quicker for output.
 
Pages: 1 

« Previous topic | Next topic »