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 › Drawing offscreen / to a PImage
Page Index Toggle Pages: 1
Drawing offscreen / to a PImage (Read 423 times)
Drawing offscreen / to a PImage
Jun 13th, 2009, 4:32pm
 
I couldn't see an obvious way to draw to a PImage with normal processing functions. I know it is possible to change pixels with set(), or masking, but I am looking for a way to draw onto another 'canvas' offscreen and then place it on screen when I'm ready.

Any clues?
Re: Drawing offscreen / to a PImage
Reply #1 - Jun 13th, 2009, 11:02pm
 
I think this will do what you need. Smiley
http://processing.org/reference/createGraphics_.html
Re: Drawing offscreen / to a PImage
Reply #2 - Jun 14th, 2009, 4:12am
 
A PGraphics is a PImage with added drawing functions. Actually, nearly all drawing functions working on main sketch area are usable here (the main area is a PGraphics, available under the name g).
Page Index Toggle Pages: 1