aboutsummaryrefslogtreecommitdiff
path: root/Perl/Zinc
diff options
context:
space:
mode:
authorvinot2003-07-03 13:03:54 +0000
committervinot2003-07-03 13:03:54 +0000
commit18d80e2d8e3fca7fcbe125a484e8eda150cd969f (patch)
tree6e59c4f380238aee6d468cc8d7f47b9e0382e489 /Perl/Zinc
parent23466d1294a4cde235042cc91f66d50dea76ca69 (diff)
downloadtkzinc-18d80e2d8e3fca7fcbe125a484e8eda150cd969f.zip
tkzinc-18d80e2d8e3fca7fcbe125a484e8eda150cd969f.tar.gz
tkzinc-18d80e2d8e3fca7fcbe125a484e8eda150cd969f.tar.bz2
tkzinc-18d80e2d8e3fca7fcbe125a484e8eda150cd969f.tar.xz
correct bugs
Diffstat (limited to 'Perl/Zinc')
-rw-r--r--Perl/Zinc/Graphics.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Perl/Zinc/Graphics.pm b/Perl/Zinc/Graphics.pm
index 30e9338..3db1b38 100644
--- a/Perl/Zinc/Graphics.pm
+++ b/Perl/Zinc/Graphics.pm
@@ -367,7 +367,7 @@ sub hippodromeCoords {
$coords->[1]->[0], $coords->[1]->[1]);
my @options = keys(%options);
- my $orientation = $options{'-orientation'};
+ my $orientation = ($options{'-orientation'}) ? $options{'-orientation'} : 'none';
# orientation forcée de l'hippodrome (sinon hippodrome sur le plus petit coté)
my $height = ($orientation eq 'horizontal') ? abs($yn - $y0)
@@ -1287,7 +1287,7 @@ sub ZnColorToRGB {
my $G = hex(substr($color, 1+$ndigits, $ndigits));
my $B = hex(substr($color, 1+($ndigits*2), $ndigits));
- $alpha = 100 if ($alpha eq "");
+ $alpha = 100 if (!defined $alpha or $alpha eq "");
return ($R, $G, $B, $alpha);