Skip to content

Instantly share code, notes, and snippets.

@atduskgreg
Created October 28, 2011 22:11
Show Gist options
  • Save atduskgreg/1323714 to your computer and use it in GitHub Desktop.
Save atduskgreg/1323714 to your computer and use it in GitHub Desktop.
pgraphics text example
String t = "start";
PGraphics pg;
void setup(){
size(500,500);
pg = createGraphics(500,500, P2D);
pg.beginDraw();
pg.text("pgraphics",20,20);
pg.endDraw();
}
void draw(){
background(0);
text(t, 20,20);
if(mousePressed){
image(pg, mouseX, mouseY);
}
}
void keyPressed(){
t = t + key;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment