From 5917d40c2438e0b74785469313c15e30c5a7525b Mon Sep 17 00:00:00 2001 From: vinot Date: Thu, 3 Jul 2003 14:33:56 +0000 Subject: corrections bugs --- Perl/demos/Tk/demos/zinc_lib/MagicLens.pl | 7 ++++--- Perl/demos/Tk/demos/zinc_lib/testGraphics.pl | 25 +++++++++++++------------ 2 files changed, 17 insertions(+), 15 deletions(-) (limited to 'Perl/demos') diff --git a/Perl/demos/Tk/demos/zinc_lib/MagicLens.pl b/Perl/demos/Tk/demos/zinc_lib/MagicLens.pl index 4a5d1ff..dc844e3 100644 --- a/Perl/demos/Tk/demos/zinc_lib/MagicLens.pl +++ b/Perl/demos/Tk/demos/zinc_lib/MagicLens.pl @@ -38,8 +38,8 @@ my @basiccolors = (['Jaune','#fff52a','#f1f1f1','#6a6611'], ['Vert','#0fa706','#979797','#096604'], ["Jaune\nVert",'#9dd625','#c9c9c9','#496311']); -my $circle_coords = [[0,-30],[-16.569,-30,c],[-30,-16.569,c],[-30,0],[-30,16.569,c],[-16.569,30,c],[0,30], - [16.569,30,c],[30,16.569,c],[30,0],[30,-16.569,c],[16.569,-30,c],[0,-30]]; +my $circle_coords = [[0,-30],[-16.569,-30,'c'],[-30,-16.569,'c'],[-30,0],[-30,16.569,'c'],[-16.569,30,'c'],[0,30], + [16.569,30,'c'],[30,16.569,'c'],[30,0],[30,-16.569,'c'],[16.569,-30,'c'],[0,-30]]; # MagicLens @@ -178,7 +178,8 @@ for (my $i = 0; $i < 12; $i++) { foreach (@{$zncolors}){ ($_) = split /;/, $_;} # réalisation des pas de dégradé (saturation -> désaturation) - for (my $c = 0; $c < 11; $c++) { + my $c; + for ($c = 0; $c < 11; $c++) { # couleur du pas my $color = $zncolors->[$c]; diff --git a/Perl/demos/Tk/demos/zinc_lib/testGraphics.pl b/Perl/demos/Tk/demos/zinc_lib/testGraphics.pl index e5e4bb4..272d1cc 100644 --- a/Perl/demos/Tk/demos/zinc_lib/testGraphics.pl +++ b/Perl/demos/Tk/demos/zinc_lib/testGraphics.pl @@ -582,14 +582,14 @@ my %pagesconf = ('Rectangle' => {'consigne' => {-itemtype => 'text', }, 'Polygone' => {'consigne' => {-itemtype => 'text', - -coords => [-285, 165], + -coords => [-285, 160], -params => {-font => $font_9b, - -text => "Click and Drag inside Polygons for rotate them", + -text => "Click and Drag inside Polygons for rotate them\nEscape key reset transfos.", -color => '#2222cc', }, }, 'triangle' => {-itemtype => 'group', - -coords => [-210, -90], + -coords => [-215, -95], -items => {'form' => {-itemtype => 'polygone', -coords => [0, 0], -numsides => 3, @@ -619,7 +619,7 @@ my %pagesconf = ('Rectangle' => {'consigne' => {-itemtype => 'text', }, 'carre' => {-itemtype => 'group', - -coords => [-80, -70], + -coords => [-80, -75], -items => {'form' => {-itemtype => 'polygone', -coords => [0, 0], -numsides => 4, @@ -649,7 +649,7 @@ my %pagesconf = ('Rectangle' => {'consigne' => {-itemtype => 'text', }, 'pentagone' => {-itemtype => 'group', - -coords => [65, -70], + -coords => [65, -75], -items => {'form' => {-itemtype => 'polygone', -coords => [0, 0], -numsides => 5, @@ -679,7 +679,7 @@ my %pagesconf = ('Rectangle' => {'consigne' => {-itemtype => 'text', }, 'hexagone' => {-itemtype => 'group', - -coords => [210, -70], + -coords => [210, -75], -items => {'form' => {-itemtype => 'polygone', -coords => [0, 0], -numsides => 6, @@ -708,7 +708,7 @@ my %pagesconf = ('Rectangle' => {'consigne' => {-itemtype => 'text', }, 'heptagone' => {-itemtype => 'group', - -coords => [-215, 90], + -coords => [-215, 85], -items => {'form' => {-itemtype => 'polygone', -coords => [0, 0], -numsides => 7, @@ -738,7 +738,7 @@ my %pagesconf = ('Rectangle' => {'consigne' => {-itemtype => 'text', 'octogone' => {-itemtype => 'group', - -coords => [-76, 90], + -coords => [-76, 85], -items => {'form' => {-itemtype => 'polygone', -coords => [0, 0], -numsides => 8, @@ -767,7 +767,7 @@ my %pagesconf = ('Rectangle' => {'consigne' => {-itemtype => 'text', }, 'petagone' => {-itemtype => 'group', - -coords => [66, 90], + -coords => [66, 85], -items => {'form' => {-itemtype => 'polygone', -coords => [0, 0], -numsides => 32, @@ -796,7 +796,7 @@ my %pagesconf = ('Rectangle' => {'consigne' => {-itemtype => 'text', }, 'etoile' => {-itemtype => 'group', - -coords => [210, 90], + -coords => [210, 85], -items => {'form' => {-itemtype => 'polygone', -coords => [0, 0], -numsides => 5, @@ -1494,7 +1494,7 @@ foreach my $shape (reverse @{$shapes}) { } # création du contenu des pages -my $i = 0; +$i = 0; foreach my $pagename (reverse @pagenames) { my $pagestyle = $pagesconf{$pagename}; if ($pagestyle) { @@ -1568,7 +1568,8 @@ sub setBindings { $mw->Tk::bind('', sub {viewRotate('ccw');}); # Escape : reset transfos - $mw->Tk::bind('', sub {$zinc->treset('move'); + $mw->Tk::bind('', sub {$zinc->treset('poly'); + $zinc->treset('move'); $zinc->raise('move'); $zinc->treset($curview);}); -- cgit v1.1