aboutsummaryrefslogtreecommitdiff
path: root/Perl/Zinc
diff options
context:
space:
mode:
authormertz2004-04-16 09:06:55 +0000
committermertz2004-04-16 09:06:55 +0000
commit14d7c44e20f6e334751bcca12b985220d5ebe5fd (patch)
treec589d9574edf60066fa3dd0f46a73be34ee7acdb /Perl/Zinc
parentef603d4fce585f5eca9e86c6d058ecc8acfad0b5 (diff)
downloadtkzinc-14d7c44e20f6e334751bcca12b985220d5ebe5fd.zip
tkzinc-14d7c44e20f6e334751bcca12b985220d5ebe5fd.tar.gz
tkzinc-14d7c44e20f6e334751bcca12b985220d5ebe5fd.tar.bz2
tkzinc-14d7c44e20f6e334751bcca12b985220d5ebe5fd.tar.xz
correction de 3 warnings qui faisaient �chouer le test t/Import.t de Tk::Zinc:
Use of implicit split to @_ is deprecated at line 2602. "my" variable $b masks earlier declaration in same scope at line 2721. "my" variable $value masks earlier declaration in same scope at line 3053.
Diffstat (limited to 'Perl/Zinc')
-rw-r--r--Perl/Zinc/Graphics.pm19
1 files changed, 9 insertions, 10 deletions
diff --git a/Perl/Zinc/Graphics.pm b/Perl/Zinc/Graphics.pm
index 71d08ed..8305c81 100644
--- a/Perl/Zinc/Graphics.pm
+++ b/Perl/Zinc/Graphics.pm
@@ -2598,8 +2598,8 @@ sub zincItemPredominantColor {
} else {
my $grad = $widget->itemcget($item, -fillcolor);
-
- return $grad if (scalar (split / /, $grad) < 2);
+
+ return $grad if (scalar (my @unused = (split / /, $grad)) < 2);
my @colorparts = split /\|/, $grad;
foreach my $section (@colorparts) {
@@ -2718,10 +2718,10 @@ sub RGBtoLCH {
# Conversion XYZtoLab
$gamma = 1/3;
- my ($L, $a, $b);
+ my ($L, $A, $B);
if ($Y == 0) {
- ($L, $a, $b) = (0, 0, 0);
+ ($L, $A, $B) = (0, 0, 0);
} else {
@@ -2733,8 +2733,8 @@ sub RGBtoLCH {
$L = (116.0 * $Ys) - 16.0;
- $a = 500 * ($Xs - $Ys);
- $b = 200 * ($Ys - $Zs);
+ $A = 500 * ($Xs - $Ys);
+ $B = 200 * ($Ys - $Zs);
}
@@ -2742,12 +2742,12 @@ sub RGBtoLCH {
my ($C, $H);
- if ($a == 0) {
+ if ($A == 0) {
$H = 0;
} else {
- $H = atan2($b, $a);
+ $H = atan2($B, $A);
if ($H > 0) {
$H = ($H / pi) * 180;
@@ -2758,7 +2758,7 @@ sub RGBtoLCH {
}
- $C = sqrt($a**2 + $b**2);
+ $C = sqrt($A**2 + $B**2);
return [$L, $C, $H];
@@ -3046,7 +3046,6 @@ sub min {
#-----------------------------------------------------------------------------------
sub r_modp {
my ($x, $m) = @_;
- my $value;
return undef if $m == 0;