root / trunk / samples / draw.rb

Revision 120, 216 bytes (checked in by why, 11 months ago)

* shoes/ruby.c: okay, using the Color class for everywhere colors are put to use.
* samples/: switched most of the examples to using the rgb and gray methods, though the old techniques are still good.

Line 
1Shoes.app do
2  background "#999"
3  stroke "#000"
4  x, y = nil, nil
5  motion do |_x, _y|
6    if x and y and (x != _x or y != _y)
7      append do
8        line x, y, _x, _y
9      end
10    end
11    x, y = _x, _y
12  end
13end
Note: See TracBrowser for help on using the browser.