~ubuntu-branches/ubuntu/hardy/xcircuit/hardy

« back to all changes in this revision

Viewing changes to examples/python/panzoom.py

  • Committer: Bazaar Package Importer
  • Author(s): Aanjhan Ranganathan
  • Date: 2006-04-18 23:51:39 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060418235139-s49pkhwdzxvsxm5k
Tags: 3.4.21-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# The followin Python script replaces the zoom in/out operators
 
2
# with a pan function followed by a zoom.  The range of the zoom
 
3
# can be adjusted by this method, too.
 
4
 
 
5
def panzoomin():
 
6
  T=getcursor()
 
7
  pan(T)
 
8
  zoom(1.5)
 
9
 
 
10
def panzoomout():
 
11
  T=getcursor()
 
12
  pan(T)
 
13
  zoom(0.66667)
 
14
 
 
15
unbind("Z", "Zoom In")
 
16
unbind("z", "Zoom Out")
 
17
 
 
18
bind("Z", "panzoomin")
 
19
bind("z", "panzoomout")