|
Author |
Topic: shape in image buffer (Read 558 times) |
|
eskimoblood
|
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
|
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
|
Re: shape in image buffer
« Reply #2 on: Mar 20th, 2005, 8:34pm » |
|
Thanks, thats it.
|
|
|
|
|