วันพุธที่ 26 สิงหาคม พ.ศ. 2558

Lab2-Digital Clock


void setup(){
 size(400,250);
}
void draw() {
  background(204);
  fill(0,0,0);
  rect(0,0,400,250,15);
  fill(255);
  rect(20,20,360,210,8);
  fill(0,0,0);
  textSize(100);
  text(":",120,125);
  text(":",240,125);
  textSize(80);
  text(second(),265,127);
  text(minute(),145,127);
  text(hour(),25,127);
  textSize(25);
  text("Date",120,200);
  text("/",230,200);
  text("/",270,200);
  textSize(15);
  text(year(),190,200);
  text(month(),250,200);
  text(day(),285,200);
}

ไม่มีความคิดเห็น:

แสดงความคิดเห็น