2015-12-2 15:54:44 [显示全部楼层]
5825浏览
查看: 5825|回复: 0

[项目] processing显示时间

[复制链接]
本帖最后由 kaka 于 2015-12-2 15:54 编辑
  1. int th, tm, ts, oth, otm, ots;
  2. void setup() {
  3.   size (600, 480);
  4.   frameRate(30);
  5.   smooth();
  6.   th=hour();
  7.   tm=minute();
  8.   ts=second();
  9.   oth=th;
  10.   otm=tm;
  11.   ots=ts;
  12. }
  13. void draw() {
  14. background(200);
  15.   th=hour();
  16.   tm=minute();
  17.   ts=second();
  18.    textSize(40);
  19.   fill(0);
  20.      text(":     :", 180, 117);
  21.   fill(200);
  22.   text(oth, 130, 120);
  23.   text(otm, 200, 120);
  24.   text(ots, 270, 120);
  25.   fill(0);
  26.   text(th, 130, 120);
  27.   text(tm, 200, 120);
  28.   text(ts, 270, 120);
  29.   oth=th;
  30.   otm=tm;
  31.   ots=ts;
  32. }
复制代码
效果展示processing显示时间图1

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail