From 839c6cd06b3fccc2e6dc227746e58b3544a70b22 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Sun, 30 Mar 2003 09:09:44 +0000 Subject: Mise � jour interm�diaire --- demos/tiger.tcl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'demos/tiger.tcl') 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 "press motion %x %y" bind $w.zinc release bind $w.zinc "press zoom %x %y" bind $w.zinc release +bind $w.zinc "press mouseRotate %x %y" +bind $w.zinc 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 } -- cgit v1.1