Sha256: 36e809c274861cce848b3f2a9fc402b20400acfd1eacb1b7803dd006c1bd59b3
Contents?: true
Size: 469 Bytes
Versions: 15
Compression:
Stored size: 469 Bytes
Contents
# -*- coding: utf-8 -*- require 'dxruby' i = Image.new(640, 480) i.boxFill(50, 50, 350, 200, [255, 0, 0]) i.circle(50, 50, 10, [0, 255, 0]) i.circle(350, 50, 10, [0, 255, 0]) i.circle(50, 200, 10, [0, 255, 0]) i.circle(350, 200, 10, [0, 255, 0]) font = Font.new(50, 'MS Gothic') Window.loop do Window.draw(0, 0, i) t = Time.now if t.sec.even? s = t.strftime('%H:%M:%S') else s = t.strftime('%H %M %S') end Window.drawFont(100, 100, s, font) end
Version data entries
15 entries across 15 versions & 1 rubygems