views:

77

answers:

2

how to do a zoom in/out with wxpython? what are the very basics for this purpose? I googled this, but could not find much, thanks!!

+2  A: 

Instead of zoom, perhaps 'scaling' is what you're looking for:

http://www.wxpython.org/docs/api/wx.Size-class.html#Scale

fseto
@fseto: thank you soo much
serina
+2  A: 

You should look at FloatCanvas or FloatCanvas2. I know one of them has a zooming (and maybe panning) feature. You can get ideas about drawing rectangles from Whyteboard. Here's a few links:

http://wiki.wxpython.org/FloatCanvas http://www.wxpython.org/docs/api/wx.lib.floatcanvas-module.html http://whyteboard.org/

Mike Driscoll
@Mike: thank you, but how am I gonna install it into my folder? I tried but failed... thanks ~~
serina
You should be able to unzip FloatCanvas to your folder (if it's not already included with wxPython). Whyteboard is a program all by itself. I just recommend downloading the source and reading it.
Mike Driscoll