Hidetoshi NAGAI
4/3/2008 5:16:00 PM
From: Bryan Richardson <btrichardson@gmail.com>
Subject: Ruby Tk Canvas Drawing
Date: Fri, 4 Apr 2008 00:09:18 +0900
Message-ID: <c60598da19be2f08aeb92d8ab1e6fc1b@ruby-forum.com>
> Can anyone tell me how to 'move' an existing TckOval in Ruby Tk?
For example,
------------------------------------------------------------
canvas = TkCanvas.new.pack
tag = TkcTag.new(canvas)
oval = TkcOval.new(canvas, [100,100], [150,150], :tags=>tag)
line = TkcLine.new(canvas, [100,100], [150,150], :tags=>tag)
oval.move(20, -15) # move
line.move(20, -15) # move
tag.move(30, 20) # move items with tag
oval.coords([50,100], [200,140]) # transform
line.coords([50,50], [100,50], [50,100], [200,140]) # transform
------------------------------------------------------------
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)