From: Joel VanderWerf Date: 2009-09-09T05:29:47+09:00 Subject: Re: Zoomable TkCanvas? Josef Wolf wrote: > But how do I override the methods to create the items? In Perl/Tk, that > would be easy, since item creation is done via canvas methods. But in > Ruby/Tk, items are created via their own classes (e.g. TkcLine.new(args) > or something). There don't seem to exist methods in the Canvas class to > create items, which could easily be overridden. Maybe subclass (or delegate to) the Tk classes: class MyRectangle < TkcRectangle def initialize(x,y,w,h) super(...) # adjust args depending on zoom level etc. end end -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407