Skip to content

Instantly share code, notes, and snippets.

@Spaxe
Created September 12, 2015 07:27
Show Gist options
  • Save Spaxe/bb6b9c22522a14af5b90 to your computer and use it in GitHub Desktop.
Save Spaxe/bb6b9c22522a14af5b90 to your computer and use it in GitHub Desktop.
PGraphics gStuff;
int w = 400;
int h = 300;
void setup () {
size(w, h);
gStuff = createGraphics(w, h);
}
void draw() {
drawStuff(gStuff);
image(gStuff, 0, 0);
}
void drawStuff (PGraphics g) {
g.beginDraw();
g.ellipse(100, 100, 50, 50);
g.endDraw();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment