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.
Page Index Toggle Pages: 1
PGraphics (Read 1135 times)
PGraphics
May 23rd, 2005, 3:24pm
 

I know there are a few PGraphics issues being mentioned, but does anyone have a solution for basic 2D buffering.

As this won't work:

setup stuff:
PGraphics img;
img= new PGraphics(200,200,null);


Code:

img.stroke(255,0,0);
img.strokeWeight(2);
img.line(pmouseX, pmouseY, mouseX, mouseY);

img.noTint();
image(img,x,y,xsize,ysize);
Re: PGraphics
Reply #1 - May 23rd, 2005, 5:44pm
 
I'm also interested in this.  My old project (ATuBola) and new ideas, rely on the feature of buffering.

any help on this issue would be really great.

thanks,
ricard

can't wait to remake ATuBola with sound (ESS library)!!!
Re: PGraphics
Reply #2 - May 23rd, 2005, 6:53pm
 
this is something that i use, and it works great:
Code:

PGraphics3 ui;
PImage gui, guimask;
PFont dFont = loadFont("OCR-B.vlw.gz");
void setup()
{
size(300,300);
noStroke();
gui = loadImage("gui.gif");
guimask = loadImage("guimask.gif");
ui = new PGraphics3(130,height,null);
ui.defaults();
ui.image(gui,0,0); // global PImage gui
//ui.fill(255);
ui.textFont(dFont,18); // global PFont dFont
ui.textAlign(LEFT);
ui.text("Habla",10,270);
ui.mask(guimask); // global PImage guimask
}
void draw(){
image(ui,0,0);
}


also look here:
http://as.processing.org/discourse/yabb_beta/YaBB.cgi?board=Contribution_3DOpenGL;action=display;num=1115982971;start=18
Re: PGraphics
Reply #3 - May 24th, 2005, 12:06am
 

Yeah, I tried that one which was doing great until I wanted access to the smooth function which is denied in 3d mode.

Sorry, I didn't mention that in my original post.

Thanks for the suggestion though!
Re: PGraphics
Reply #4 - May 24th, 2005, 12:18am
 

Hmmm!! Glancing through the bugs section, it looks as this is an issue associated with stroke(), or strokeWeight() (I was just looking and have forgotten already. Oh! this dummy head!)

Still, you can't have it all!
Page Index Toggle Pages: 1