Skip to content

Instantly share code, notes, and snippets.

@PostArchitekt
Created March 29, 2014 17:59
Show Gist options
  • Save PostArchitekt/9859123 to your computer and use it in GitHub Desktop.
Save PostArchitekt/9859123 to your computer and use it in GitHub Desktop.
void saveVector() {
PGraphics tmp = null;
if (record) {
tmp = beginRecord(PDF, "render-######.pdf");
}
if (tmp == null) {
H.drawStage();
} else {
PGraphics g = tmp;
boolean uses3D = false;
float alpha = 1;
H.stage().paintAll(g, uses3D, alpha);
}
if (record) {
endRecord();
record = false;
}
}
void keyPressed() {
if (key == 's') {
record = true;
draw();
}
}
@PostArchitekt
Copy link
Author

boolean record = false;

voidDraw() {
saveVector();
{

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment