From: Bryan Richardson Date: 2008-04-04T06:35:55+09:00 Subject: Re: Ruby Tk Canvas Drawing Thanks for the help guys. Is it possible to only move one end of a line without moving the other end? -- Bryan Hidetoshi NAGAI wrote: > From: Bryan Richardson > Subject: Ruby Tk Canvas Drawing > Date: Fri, 4 Apr 2008 00:09:18 +0900 > Message-ID: >> 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 -- Posted via http://www.ruby-forum.com/.