aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);