aboutsummaryrefslogtreecommitdiff
path: root/sandbox/zinc.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/zinc.tcl')
-rw-r--r--sandbox/zinc.tcl38
1 files changed, 19 insertions, 19 deletions
diff --git a/sandbox/zinc.tcl b/sandbox/zinc.tcl
index a828934..0151046 100644
--- a/sandbox/zinc.tcl
+++ b/sandbox/zinc.tcl
@@ -1,6 +1,6 @@
#!/usr/bin/wish -f
-load tkradar3.1.so
+load tkzinc3.1.so
package require Img
set top 1
@@ -9,14 +9,14 @@ image create photo logo -file /usr/share/toccata/images/logo.gif
image create photo logosmall -file /usr/share/toccata/images/logo-small.gif
#image create photo papier -file /usr/share/toccata/images/dgtexture-dragstrip.xpm
-set r [radar .r -backcolor gray -relief sunken]
+set r [zinc .r -backcolor gray -relief sunken]
pack .r -expand t -fill both
set scale 1.0
set centerX 0.0
set centerY 0.0
-set radarWidth 800
-set radarHeight 500
-.r configure -width $radarWidth -height $radarHeight
+set zincWidth 800
+set zincHeight 500
+.r configure -width $zincWidth -height $zincHeight
#.r configure -drawbboxes t
set view [.r add group $top -tags "controls"]
@@ -45,27 +45,27 @@ grid .rc.shrink -row 1 -column 0
grid .rc.reset -row 1 -column 2 -sticky ew
pack .rc
-bind .r <Configure> "RadarStyleConfig %W %w %h"
+bind .r <Configure> "ZincStyleConfig %W %w %h"
-proc RadarStyleConfig {radar w h} {
- global radarWidth radarHeight
+proc ZincStyleConfig {zinc w h} {
+ global zincWidth zincHeight
- set bw [$radar cget -borderwidth]
- set radarWidth [expr $w - 2*$bw]
- set radarHeight [expr $h - 2*$bw]
- updateTransform $radar
+ set bw [$zinc cget -borderwidth]
+ set zincWidth [expr $w - 2*$bw]
+ set zincHeight [expr $h - 2*$bw]
+ updateTransform $zinc
}
-proc updateTransform {radar} {
- global radarWidth radarHeight
+proc updateTransform {zinc} {
+ global zincWidth zincHeight
global scale centerX centerY
global top
- $radar treset $top
- $radar scale $top 1 -1
- $radar translate $top [expr -$centerX] [expr -$centerY]
- $radar scale $top $scale $scale
- $radar translate $top [expr $radarWidth/2] [expr $radarHeight/2]
+ $zinc treset $top
+ $zinc scale $top 1 -1
+ $zinc translate $top [expr -$centerX] [expr -$centerY]
+ $zinc scale $top $scale $scale
+ $zinc translate $top [expr $zincWidth/2] [expr $zincHeight/2]
}
#