diff options
author | lecoanet | 2002-04-08 13:40:20 +0000 |
---|---|---|
committer | lecoanet | 2002-04-08 13:40:20 +0000 |
commit | f9e98b0b23e0bce9083a5056289436a24e22a982 (patch) | |
tree | efd21e8929e2cda4980c2777003a5787f5caf679 /sandbox/allreliefs.pl | |
parent | 0bb4e281aa914542b7ecbae7ba452547770ac9d5 (diff) | |
download | tkzinc-f9e98b0b23e0bce9083a5056289436a24e22a982.zip tkzinc-f9e98b0b23e0bce9083a5056289436a24e22a982.tar.gz tkzinc-f9e98b0b23e0bce9083a5056289436a24e22a982.tar.bz2 tkzinc-f9e98b0b23e0bce9083a5056289436a24e22a982.tar.xz |
*** empty log message ***
Diffstat (limited to 'sandbox/allreliefs.pl')
-rw-r--r-- | sandbox/allreliefs.pl | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/sandbox/allreliefs.pl b/sandbox/allreliefs.pl new file mode 100644 index 0000000..939e5ba --- /dev/null +++ b/sandbox/allreliefs.pl @@ -0,0 +1,51 @@ +#!/usr/bin/perl +# $Id$ +# these simple samples have been developped by C. Mertz mertz@cena.fr and N. Banoun banoun@cena.fr + +use Tk; +use Tk::Zinc; +use strict; + +my ($grp,, $s, $i); +my $defaultfont = '-b&h-lucida-bold-r-normal-*-*-140-*-*-p-*-iso10646-1'; +my $mw = MainWindow->new(); +my $zinc = $mw->Zinc(-width => 700, -height => 300, + -render => 1, + )->pack(); + + +$grp = $zinc->add('group', 1); +$zinc->add('rectangle', $grp, [0, 0, 70, 50], + -filled => 1, + -fillcolor => 'tan', + -linecolor => 'tan', + -linewidth => 6, + -relief => 'raised', + -tags => ['attrs']); +$zinc->add('text', $grp, + -text => 'raised', + -anchor => 'center', + -position => [35, -10], + -tags => ['attrs']); +$zinc->translate($grp, 20, 30); +$i = 1; +foreach $s (('sunken', 'ridge', 'groove', + 'roundraised', 'roundsunken', 'roundridge', 'roundgroove', + 'raisedrule', 'sunkenrule')) { + $grp = $zinc->clone($grp); + $zinc->addtag("g$grp", 'withtag', 'attrs', $grp, 0); + $zinc->itemconfigure("attrs && g$grp", + -text => $s, + -relief => $s); + $i++; + if ($i == 5) { + $zinc->translate($grp, -3*90, 80); + $i = 1; + } + else { + $zinc->translate($grp, 90, 0); + } +} + + +MainLoop(); |