diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/simpleRadar.tcl | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/demos/simpleRadar.tcl b/demos/simpleRadar.tcl index 15df644..f940a85 100644 --- a/demos/simpleRadar.tcl +++ b/demos/simpleRadar.tcl @@ -7,6 +7,7 @@ if {![info exists zincDemo]} { } namespace eval simpleRadar { + variable rotation 0 variable w .simpleRadar catch {destroy $w} toplevel $w @@ -23,7 +24,7 @@ namespace eval simpleRadar { Click Button 2 for identifiying the closest item (result in the terminal). Button 3 for dragging most items, but not the ministrip (not in the same group). Shift-Button 3 for zooming independently on X and Y axis. - Ctrl-Button 3 for rotationg graphic objects. + Ctrl-Button 3 for rotating graphic objects. Enter/Leave in flight label fields, speed vector, position and leader, and in the ministrip fields. Click Button 1 on flight track to display a route.} @@ -45,13 +46,23 @@ namespace eval simpleRadar { # if true the flights are no more moving variable pause 0 - zinc $w.zinc -backcolor gray65 -relief sunken -font 10x20 \ - -width $zincWidth -height $zincHeight +# zinc $w.zinc -render 1 -enablerotation 1 -backcolor gray65 -relief sunken -font 10x20 \ +# -width $zincWidth -height $zincHeight + zinc $w.zinc -render 1 -backcolor gray65 -relief sunken -font 10x20 \ + -width $zincWidth -height $zincHeight pack $w.zinc -expand 1 -fill both $w.zinc add group $top -tags {controls radar} $w.zinc configure -overlapmanager [$w.zinc find withtag radar] +# bind $w.zinc <Alt-1> { +# incr ::simpleRadar::rotation 10 +# %W configure -screenrotation $::simpleRadar::rotation +# } +# bind $w.zinc <Alt-3> { +# incr ::simpleRadar::rotation -10 +# %W configure -screenrotation $::simpleRadar::rotation +# } #------------------------------------------------- # Create control panel @@ -152,6 +163,8 @@ namespace eval simpleRadar { $z translate 1 [expr -$centerX] [expr -$centerY] $z scale 1 $scale $scale $z scale 1 1 -1 +# set hVirtualSize [expr hypot($zincWidth, $zincHeight)/2] +# $z translate 1 $hVirtualSize $hVirtualSize $z translate 1 [expr $zincWidth/2] [expr $zincHeight/2] } |