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
   Programs
(Moderators: fry, REAS)
   shape in image buffer
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: shape in image buffer  (Read 558 times)
eskimoblood

222550793222550793 WWW
shape in image buffer
« on: Mar 20th, 2005, 12:16pm »

Is there way to draw an shape,rect or ellipse not direct on the screen but in an BImage.
 
Mark Hill

WWW Email
Re: shape in image buffer
« Reply #1 on: Mar 20th, 2005, 1:18pm »

A new BGraphics object is what you need. This has been dealt with elsewhere. Do a BGraphics search of the forum.
 
 
Here's some code to start off with:
 
 
 BGraphics gBuffer;  
 
 void setup()  
 {  
  size(200,200);  
 
  gBuffer = new BGraphics( width, height);  
 }  
 
 void loop()  
 {  
  gBuffer.background(0);  
  image(gBuffer,0,0, 200,200);
  gBuffer.rect(50,50,100,100);
 }
« Last Edit: Mar 20th, 2005, 1:21pm by Mark Hill »  
eskimoblood

222550793222550793 WWW
Re: shape in image buffer
« Reply #2 on: Mar 20th, 2005, 8:34pm »

Thanks, thats it.
 
Pages: 1 

« Previous topic | Next topic »