From 18d80e2d8e3fca7fcbe125a484e8eda150cd969f Mon Sep 17 00:00:00 2001 From: vinot Date: Thu, 3 Jul 2003 13:03:54 +0000 Subject: correct bugs --- Perl/Zinc/Graphics.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Perl/Zinc') 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); -- cgit v1.1