aboutsummaryrefslogtreecommitdiff
path: root/sandbox/zinc.tcl
diff options
context:
space:
mode:
authorlecoanet2000-03-07 13:16:09 +0000
committerlecoanet2000-03-07 13:16:09 +0000
commitf6018b2e4b184a2ec9eca7bbd3e2532cc4ed17ed (patch)
tree92e9d68cd779fab2e6579b20ac574f2cef6ae557 /sandbox/zinc.tcl
parent3f47be9fe5d3006927c79eb156cfbed946243e26 (diff)
downloadtkzinc-f6018b2e4b184a2ec9eca7bbd3e2532cc4ed17ed.zip
tkzinc-f6018b2e4b184a2ec9eca7bbd3e2532cc4ed17ed.tar.gz
tkzinc-f6018b2e4b184a2ec9eca7bbd3e2532cc4ed17ed.tar.bz2
tkzinc-f6018b2e4b184a2ec9eca7bbd3e2532cc4ed17ed.tar.xz
*** empty log message ***
Diffstat (limited to 'sandbox/zinc.tcl')
-rw-r--r--sandbox/zinc.tcl28
1 files changed, 25 insertions, 3 deletions
diff --git a/sandbox/zinc.tcl b/sandbox/zinc.tcl
index 0151046..9e8bc78 100644
--- a/sandbox/zinc.tcl
+++ b/sandbox/zinc.tcl
@@ -1,14 +1,19 @@
#!/usr/bin/wish -f
load tkzinc3.1.so
-package require Img
+#package require Img
set top 1
+#memory info
+#memory trace on
+#memory validate on
+
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
+#image create photo bois -file texture-bois1.xpm
+#set r [zinc .r -backcolor gray -relief sunken -tile bois]
set r [zinc .r -backcolor gray -relief sunken]
pack .r -expand t -fill both
set scale 1.0
@@ -16,7 +21,7 @@ set centerX 0.0
set centerY 0.0
set zincWidth 800
set zincHeight 500
-.r configure -width $zincWidth -height $zincHeight
+#.r configure -width $zincWidth -height $zincHeight
#.r configure -drawbboxes t
set view [.r add group $top -tags "controls"]
@@ -36,6 +41,7 @@ button .rc.shrink -text "Shrink" \
button .rc.reset -text "Reset" \
-command {set scale 1.0; set centerX 0.0; set centerY 0.0; \
updateTransform .r}
+button .rc.quit -text "Quit" -command "exit"
grid .rc.up -row 0 -column 2 -sticky ew
grid .rc.down -row 2 -column 2 -sticky ew
grid .rc.left -row 1 -column 1
@@ -43,6 +49,7 @@ grid .rc.right -row 1 -column 3
grid .rc.expand -row 1 -column 4
grid .rc.shrink -row 1 -column 0
grid .rc.reset -row 1 -column 2 -sticky ew
+grid .rc.quit -row 3 -column 2
pack .rc
bind .r <Configure> "ZincStyleConfig %W %w %h"
@@ -254,5 +261,20 @@ bind .r <ButtonRelease-1> "finditems %x %y"
.r bind all <1> { if {! [catch {.r find withtag current} item] } { \
puts "<1> in $item" } else { puts "None" } }
+#
+#for {set j 0} {$j < 20} {incr j} {
+# memory info
+# for {set i 0} {$i < 10} {incr i} {
+# set a($i) [.r add icon 1 -image logo]
+# set b($i) [.r add rectangle 1 "10 10 1000 1000" -filled t -tile logosmall]
+# set c($i) [.r add curve 1 "10 10 10 100 100 100" -filled t -tile logosmall]
+# }
+# for {set i 0} {$i < 10} {incr i} {
+# .r remove $a($i)
+# .r remove $b($i)
+# .r remove $c($i)
+# }
+#}
+
source "controls.tcl"