File: panzoom.py

package info (click to toggle)
xcircuit 2.5.3rev0-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,292 kB
  • ctags: 3,497
  • sloc: ansic: 41,848; sh: 2,741; python: 473; makefile: 165
file content (19 lines) | stat: -rw-r--r-- 379 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# The followin Python script replaces the zoom in/out operators
# with a pan function followed by a zoom.  The range of the zoom
# can be adjusted by this method, too.

def panzoomin():
  T=getcursor()
  pan(T)
  zoom(1.5)

def panzoomout():
  T=getcursor()
  pan(T)
  zoom(0.66667)

unbind("Z", "Zoom In")
unbind("z", "Zoom Out")

bind("Z", "panzoomin")
bind("z", "panzoomout")