Created
October 28, 2011 22:11
-
-
Save atduskgreg/1323714 to your computer and use it in GitHub Desktop.
pgraphics text example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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