require 'tkmove4.rb' include TestBed require 'draw_common.rb' include DrawCommon c = TkCanvas.new.pack testbed( c ) move = TkMove.new( c ) f = TkFrame.new.pack TkButton.new(f, 'text'=>'enlarge', 'command'=>proc{ move.unbind c.itembind('item', '1', proc{ item = c.find_withtag('current').shift coord = get_item_coords( item ) temp = linear_map( coord, [1.2,0,0,1.2] ) set_coords( item, temp ) }) }).pack('side'=>'left') TkButton.new(f, 'text'=>'rotate', 'command'=>proc{ move.unbind c.itembind('item', '1', proc{ item = c.find_withtag('current').shift coord = get_item_coords( item ) temp = linear_map( coord, [0, -1, 1, 0] ) set_coords( item, temp ) }) }).pack('side'=>'left') Tk.mainloop