aboutsummaryrefslogtreecommitdiff
path: root/sandbox
diff options
context:
space:
mode:
authorlecoanet2003-04-16 10:18:46 +0000
committerlecoanet2003-04-16 10:18:46 +0000
commit2e434e0a9aa6ca4f249b599191264f76943dd013 (patch)
tree103a1ecad49229b2f2b83cb2edb72bdb41a10be2 /sandbox
parentc369dceef1a8e57426a9bec1b2751bd3e9c3a244 (diff)
downloadtkzinc-2e434e0a9aa6ca4f249b599191264f76943dd013.zip
tkzinc-2e434e0a9aa6ca4f249b599191264f76943dd013.tar.gz
tkzinc-2e434e0a9aa6ca4f249b599191264f76943dd013.tar.bz2
tkzinc-2e434e0a9aa6ca4f249b599191264f76943dd013.tar.xz
*** empty log message ***
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/allreliefs.pl1
-rw-r--r--sandbox/allreliefs.tcl30
2 files changed, 31 insertions, 0 deletions
diff --git a/sandbox/allreliefs.pl b/sandbox/allreliefs.pl
index 2a19151..891a16f 100644
--- a/sandbox/allreliefs.pl
+++ b/sandbox/allreliefs.pl
@@ -3,6 +3,7 @@
# these simple samples have been developped by C. Mertz mertz@cena.fr and N. Banoun banoun@cena.fr
use Tk;
+use Tk::Photo;
use Tk::Zinc;
use strict;
diff --git a/sandbox/allreliefs.tcl b/sandbox/allreliefs.tcl
new file mode 100644
index 0000000..291a02b
--- /dev/null
+++ b/sandbox/allreliefs.tcl
@@ -0,0 +1,30 @@
+# $Id$
+# these simple samples have been developped by C. Mertz mertz@cena.fr and N. Banoun banoun@cena.fr
+
+lappend auto_path [file join [file dirname [info script]] ..]
+package require Tkzinc
+
+set defaultfont "-adobe-helvetica-bold-r-normal-*-100-*-*-*-*-*-*"
+zinc .z -width 700 -height 300 -render 1 -backcolor gray
+pack .z
+
+set grp [.z add group 1]
+.z add rectangle $grp {0 0 70 50} -filled 1 -fillcolor tan -linecolor tan \
+ -linewidth 6 -relief raised -tags attrs
+.z add text $grp -text raised -anchor center -font $defaultfont \
+ -position {35 -10} -tags texts
+.z translate $grp 20 30
+
+set i 1
+foreach s {sunken ridge groove roundraised roundsunken roundridge roundgroove raisedrule sunkenrule} {
+ set grp [.z clone $grp]
+ .z itemconfigure "$grp.texts" -text $s
+ .z itemconfigure "$grp.attrs" -relief $s
+ incr i
+ if {$i == 5} {
+ .z translate $grp [expr -3*100] 80
+ set i 1
+ } else {
+ .z translate $grp 100 0
+ }
+}