aboutsummaryrefslogtreecommitdiff
path: root/demos/tiger.tcl
diff options
context:
space:
mode:
authorlecoanet2003-03-30 09:09:44 +0000
committerlecoanet2003-03-30 09:09:44 +0000
commit839c6cd06b3fccc2e6dc227746e58b3544a70b22 (patch)
tree9a1ca213fcdf9dc4e4dfa93d6b52698f1b0cf28b /demos/tiger.tcl
parentd6a7dbb3a6090cc7d8007237f0b4f75c1d3f0112 (diff)
downloadtkzinc-839c6cd06b3fccc2e6dc227746e58b3544a70b22.zip
tkzinc-839c6cd06b3fccc2e6dc227746e58b3544a70b22.tar.gz
tkzinc-839c6cd06b3fccc2e6dc227746e58b3544a70b22.tar.bz2
tkzinc-839c6cd06b3fccc2e6dc227746e58b3544a70b22.tar.xz
Mise � jour interm�diaire
Diffstat (limited to 'demos/tiger.tcl')
-rw-r--r--demos/tiger.tcl5
1 files changed, 3 insertions, 2 deletions
diff --git a/demos/tiger.tcl b/demos/tiger.tcl
index b0ac265..c494c7b 100644
--- a/demos/tiger.tcl
+++ b/demos/tiger.tcl
@@ -534,6 +534,8 @@ bind $w.zinc <ButtonPress-1> "press motion %x %y"
bind $w.zinc <ButtonRelease-1> release
bind $w.zinc <ButtonPress-2> "press zoom %x %y"
bind $w.zinc <ButtonRelease-2> release
+bind $w.zinc <ButtonPress-3> "press mouseRotate %x %y"
+bind $w.zinc <ButtonRelease-3> release
set curX 0
@@ -577,7 +579,6 @@ proc zoom {x y} {
}
set sx [expr 1.0 + (double($x - $curX) / $maxX)]
set sy [expr 1.0 + (double($y - $curY) / $maxY)]
- puts "x: $x cur: $curX max: $maxX $sx"
$w.zinc scale $topGroup $sx $sx
set curX $x
set curY $y
@@ -587,7 +588,7 @@ proc mouseRotate {x y} {
global w curAngle topGroup
set lAngle [expr atan2($y, $x)]
- $w.zinc rotate $topGroup [expr -($lAngle - $curAngle)]
+ $w.zinc rotate $topGroup [expr $lAngle - $curAngle]
set curAngle $lAngle
}