diff --git a/fhem/FHEM/98_DOIF.pm b/fhem/FHEM/98_DOIF.pm index 1b1e2aefe..9975bbddb 100644 --- a/fhem/FHEM/98_DOIF.pm +++ b/fhem/FHEM/98_DOIF.pm @@ -4390,8 +4390,11 @@ sub bar $ic="" if (!defined($ic)); } - - $out.= sprintf ('',$bwidth,$bheight,$size/100*$bwidth,$size/100*$bheight); + + my $svg_width=int($size/100*$bwidth); + my $svg_height=int($size/100*$bheight); + + $out.= sprintf ('',$bwidth,$bheight,$svg_width,$svg_height,$svg_width,$svg_height); $out.= ''; $out.= ''; $out.= ''; @@ -4747,17 +4750,17 @@ sub ring if (defined $icon and $icon ne "") { $ic="$ic\@".color($currColor,$ln) if ($icon !~ /@/); } - - $out.= sprintf('',$size/100*63,$size/100*58); + my $width=int($size/100*63); + my $height=int($size/100*58); + $out.= sprintf('',$width,$height,$width,$height); $out.= ''; $out.= ''; $out.= sprintf('\ ',$currColor,$minColor,(defined $lr ? $lr:0),$x1,$y1,$x2,$y2,color($currColor,$lr),color($minColor,$lr)); $out.= '\ - '; + '; $out.=''; - $out.=''; $out.=''; $out.=describeArc(41, 30, 28, 0, 280); @@ -4898,8 +4901,9 @@ sub ring2 if (defined $icon and $icon ne "") { $ic="$ic\@".color($currColor,$ln) if ($icon !~ /@/); } - - $out.= sprintf('',$size/100*63,$size/100*57); + my $width=int($size/100*63); + my $height=int($size/100*58); + $out.= sprintf('',$width,$height,$width,$height); $out.= ''; $out.= ''; $out.= sprintf('\ @@ -4909,7 +4913,7 @@ sub ring2 ',$currColor2,$minColor2,(defined $lr ? $lr:0),$x12,$y12,$x22,$y22,color($currColor2,$lr),color($currColor2,$lr)); $out.= '\ - '; + '; $out.=''; $out.=''; @@ -5091,8 +5095,11 @@ sub cylinder_mode } my ($y,$val1,$null); + + my $svg_width=int($size/100*$bwidth); + my $svg_height=int($size/100*($bheight+40)); - $out.= sprintf ('',$bwidth,$bheight+40,$size/100*$bwidth,$size/100*($bheight+40)); + $out.= sprintf ('',$bwidth,$bheight+40,$svg_width,$svg_height,$svg_width,$svg_height); $out.= ''; $out.= ''; $out.= '';