Jupyter at Bryn Mawr College |
|||
Public notebooks: /services/public/dblank / CS110 Intro to Computing / 2015-Fall / Notes |
size(500, 500);
rect(250, 250, 250, 250);
fill(255, 0, 0);
triangle(10, 10, 50, 50, 0, 70);
/* @pjs font="Arial.ttf"; */
void setup()
{
size(200,200);
noLoop();
textFont(createFont("Arial",32));
}
void draw()
{
background(255);
String t = "P.js";
float tw = textWidth(t);
fill(0);
text(t, (width-tw)/2, (height+32)/2);
}