Skip to content

Instantly share code, notes, and snippets.

@todocono
Last active January 1, 2016 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todocono/8099089 to your computer and use it in GitHub Desktop.
Save todocono/8099089 to your computer and use it in GitHub Desktop.
// Processing.js example sketch
int fontsize = 24;
void setup() {
size(200, 200);
stroke(0);
fill(0);
textFont(createFont("Arial",fontsize));
noLoop();
}
void draw() {
background(#F0F0E0);
String textstring = "from the web!";
float twidth = textWidth(textstring);
text(textstring, (width-twidth)/2, height/2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment