void scribe(String S) {fill(black); text(S,20,20); noFill();} void scribe(String S, int i) {fill(black); text(S,20,20+i*20); noFill();} void mousePressed() { if (mouse().isInWindow()) clickPolygon(); else ; } void keyPressed() { if (key==' ') showHelpText=!showHelpText ; if (key=='X') {String S=" "+"-####.tif"; saveFrame(S);}; ; if (key=='?') printIt=true; // toggle debug mode }; void showHelp() { fill(dblue); pushMatrix(); translate(20,20); text("PGS (PLANAR GEOMETRY SANDBOX) by Jarek Rossignac",0,0); translate(0,20); text(" ",0,0); translate(0,20); text("First click in the window to activate it ",0,0); translate(0,20); text("Press SPACE to show/hide this help text",0,0); translate(0,20); text("Click & drag points ",0,0); translate(0,20); text(" ",0,0); translate(0,20); text("Press 'X' top snap a picture (when running Processing, not in browser)",0,0); translate(0,20); text("'?' print debugging stuff (when running Processing, not in browser) ",0,0); translate(0,20); popMatrix(); noFill(); }