Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/samples/simple-draw.rb
blob: 4dc115c517a7430c6398fe132d3f8b6f2faa8e50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
Shoes.app do
  background "#999"
  stroke "#000"
  x, y = nil, nil
  motion do |_x, _y|
    if x and y and (x != _x or y != _y)
      append do
        line x, y, _x, _y
      end
    end
    x, y = _x, _y
  end
end