(Ralf, I'm putting this on the floatcanvas list as well, so save it for posterity, and see if others have ideas)
I just started to apply the patch, but then noticed that this seems to do the same thing as the current "Zoom" method: the only difference I can see is that your version defaults to pixel, rather than world coordinates, and the center point is not optional, but you can get the same thing with: Canvas.Zoom(factor, center = (x, y), centerCoords="pixel") Also: I see you used it in the OnWheel method in GUIMode.GUIMouse. However: 1) I don't think I want to change the current GUI modes, someone may like it the way it is (i.e. it zooms in or at with the wheel regardless of where the cursor is) 2) You probably don't want to put it in GUIMouse anyway, but rather one of the sub-classes. So, for your app, I'd put it in a new subclass of GUIMode, for your use. Or you could monkey-patch it -- i.e. change the class a bit on your code, but keep it the same class, so that the current toolbar, etc will work the same. Which makes me think that we could/should refactor, and have all the individual modes in mix-ins, so we can mix and match more easily -- hmm, maybe this cals for some metaclass magic? This may be the first time I need that! I'm not sure why you've removed the Draw() call from the OnMove Timer -- was that not working for you? -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] _______________________________________________ FloatCanvas mailing list [email protected] http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
