From 970321e8ed9c48200827fbc6448bd19a7f921601 Mon Sep 17 00:00:00 2001 From: saal Date: Tue, 5 Jun 2007 13:03:47 +0000 Subject: tentative de suppression des warnings sur génération de svg. --- src/SVG/SVG2zinc/Backend/PerlClass.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/SVG/SVG2zinc/Backend') diff --git a/src/SVG/SVG2zinc/Backend/PerlClass.pm b/src/SVG/SVG2zinc/Backend/PerlClass.pm index 0f490b2..18ec454 100644 --- a/src/SVG/SVG2zinc/Backend/PerlClass.pm +++ b/src/SVG/SVG2zinc/Backend/PerlClass.pm @@ -68,10 +68,10 @@ sub applyGradient { my $grad = $self -> {gradient} -> {$name}; my $id = $self -> {gradient_id} ++; my %hash = %{$grad}; - my @lignes = 'my ($x1, $y1, $x2, $y2) = $_zinc -> bbox ($previous);'; + my @lignes = 'my ($x1'."$name".', $y1'."$name".', $x2'."$name".', $y2'."$name".') = $_zinc -> bbox ($previous);'; # push (@lignes, 'my ($parent) = $_zinc -> find(\'ancestors\', $previous);'); - push (@lignes, '($x1, $y1, $x2, $y2) = $_zinc -> transform(\'device\', $parent, [$x1+1, $y1+1, $x2-2, $y2-2]);'); - push (@lignes, "my \$grad = getGradient ("); + push (@lignes, '($x1'."$name".', $y1'."$name".', $x2'."$name".', $y2'."$name".') = $_zinc -> transform(\'device\', $parent, [$x1'."$name".'+1, $y1'."$name".'+1, $x2'."$name".'-2, $y2'."$name".'-2]);'); + push (@lignes, "my \$grad"."$name"." = getGradient ("); push (@lignes, "\t'$current_package_name',"); push (@lignes, "\t'$id',"); push (@lignes, "\t'".$hash {type}."',"); @@ -79,9 +79,9 @@ sub applyGradient { push (@lignes, "\t".join (',' , @{$hash{coords}}).","); push (@lignes, "\t'".join ('|' , @{$hash{stops}})."',"); push (@lignes, "\t".join (',' , @{$hash{transform}}).","); - push (@lignes, "\t\$x1, \$y1, \$x2, \$y2"); + push (@lignes, "\t\$x1"."$name".", \$y1"."$name".", \$x2"."$name".", \$y2"."$name"); push (@lignes, ");"); - push (@lignes, "mconfigure (\$previous, $prop => \$grad);"); + push (@lignes, "mconfigure (\$previous, $prop => \$grad"."$name".");"); $self -> {current_gradient} = \@lignes; } -- cgit v1.1