diff options
author | mertz | 2002-05-03 15:42:02 +0000 |
---|---|---|
committer | mertz | 2002-05-03 15:42:02 +0000 |
commit | 91613db7bc49d04f969d6f9816b52561102a04dc (patch) | |
tree | 624cec501aec0e622d57f351d4221289537018ae | |
parent | af29749b91b12c9e23fe95267902d25ccbd3cebb (diff) | |
download | tkzinc-91613db7bc49d04f969d6f9816b52561102a04dc.zip tkzinc-91613db7bc49d04f969d6f9816b52561102a04dc.tar.gz tkzinc-91613db7bc49d04f969d6f9816b52561102a04dc.tar.bz2 tkzinc-91613db7bc49d04f969d6f9816b52561102a04dc.tar.xz |
version initiale
utilis� pour fabriquer les images de la doc
-rw-r--r-- | sandbox/alledges.pl | 47 | ||||
-rw-r--r-- | sandbox/alllineshapes.pl | 46 |
2 files changed, 93 insertions, 0 deletions
diff --git a/sandbox/alledges.pl b/sandbox/alledges.pl new file mode 100644 index 0000000..e8893a9 --- /dev/null +++ b/sandbox/alledges.pl @@ -0,0 +1,47 @@ +#!/usr/bin/perl +# $Id$ +# these simple samples have been developped by C. Mertz mertz@cena.fr + +use Tk; +use Tk::Zinc; +use strict; + +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, + -backcolor => "grey50", # this will be transparent in the doc + )->pack(); + + +my $i = 1; +my $x = 40; +my $y = 40; +foreach my $contour ( (['left'], ['right'], ['top'], ['bottom'], + ['top', 'bottom'], ['left','right'], ['left','top'], ['contour'], + ['oblique'], ['counteroblique'],['oblique','counteroblique']) ) { + my $tab = $zinc->add('tabular', 1, 1, -position => [$x, $y], + -labelformat => "a5a5+0+0", + ); + my $contour_text = "['" . join ("','",@{$contour}) . "']"; + $zinc->itemconfigure($tab, 0, + -text => $contour_text, + -border => $contour, + -alignment => "center", + -filled => 1, + -backcolor => "gray95", +); + $i++; + if ($i == 5) { + $x = 40; + $y = $y + 50; + $i = 1; + } + else { + $x = $x + 160; + } +} + + + +MainLoop(); diff --git a/sandbox/alllineshapes.pl b/sandbox/alllineshapes.pl new file mode 100644 index 0000000..89bc6bb --- /dev/null +++ b/sandbox/alllineshapes.pl @@ -0,0 +1,46 @@ +#!/usr/bin/perl +# $Id$ +# these simple samples have been developped by C. Mertz mertz@cena.fr + +use Tk; +use Tk::Zinc; +use strict; + +my $defaultfont = '-b&h-lucida-bold-r-normal-*-*-140-*-*-p-*-iso10646-1'; +my $mw = MainWindow->new(); +my $zinc = $mw->Zinc(-width => 800, -height => 500, +# -render => 1, +# -backcolor => "red", # this will be transparent in the doc + )->pack(); + + +my $i = 1; +my $x = 20; +my $y = 100; +foreach my $lineshape ( qw(straight rightlightning leftlightning rightcorner + leftcorner doublerightcorner doubleleftcorner) ) { + print "$lineshape\n"; + my $wpt = $zinc->add('waypoint', 1, 1, + -position => [$x, $y], + -labelformat => "a5a5+0+0", + -leadershape => $lineshape, + -labeldistance => 150, + ); + $zinc->itemconfigure($wpt, 0, + -text => $lineshape, + -alignment => "center", + ); + $i++; + if ($i == 4) { + $x = 20; + $y = $y + 150; + $i = 1; + } + else { + $x = $x + 180; + } +} + + + +MainLoop(); |