cvs: pecl /apc apc.php
| From: | Brian Shire | Date: | Thu, 31 Jan 2008 20:24:13 +0000 |
| Subject: | cvs: pecl /apc apc.php | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-9649@lists.php.net to get a copy of this message | ||
shire Thu Jan 31 20:24:13 2008 UTC
Modified files:
/pecl/apc apc.php
Log:
fix Bug #12865 Pie char drawing problem with apc.php
# don't display slices < 1%, seems to cause problems
http://cvs.php.net/viewvc.cgi/pecl/apc/apc.php?r1=3.68&r2=3.69&diff_format=u
Index: pecl/apc/apc.php
diff -u pecl/apc/apc.php:3.68 pecl/apc/apc.php:3.69
--- pecl/apc/apc.php:3.68 Sun Jul 22 00:25:48 2007
+++ pecl/apc/apc.php Thu Jan 31 20:24:13 2008
@@ -22,7 +22,7 @@
*/
-$VERSION='$Id: apc.php,v 3.68 2007/07/22 00:25:48 gopalv Exp $';
+$VERSION='$Id: apc.php,v 3.69 2008/01/31 20:24:13 shire Exp $';
////////// READ OPTIONAL CONFIGURATION FILE ////////////
if (file_exists("apc.conf.php")) include("apc.conf.php");
@@ -344,17 +344,21 @@
if($block['offset']!=$ptr) { // Used block
$angle_to = $angle_from+($block['offset']-$ptr)/$s;
if(($angle_to+$fuzz)>1) $angle_to = 1;
- fill_arc($image,$x,$y,$size,$angle_from*360,$angle_to*360,$col_black,$col_red);
- if (($angle_to-$angle_from)>0.05) {
- array_push($string_placement, array($angle_from,$angle_to));
+ if( ($angle_to*360) - ($angle_from*360) >= 1) {
+ fill_arc($image,$x,$y,$size,$angle_from*360,$angle_to*360,$col_black,$col_red);
+ if (($angle_to-$angle_from)>0.05) {
+ array_push($string_placement, array($angle_from,$angle_to));
+ }
}
$angle_from = $angle_to;
}
$angle_to = $angle_from+($block['size'])/$s;
if(($angle_to+$fuzz)>1) $angle_to = 1;
- fill_arc($image,$x,$y,$size,$angle_from*360,$angle_to*360,$col_black,$col_green);
- if (($angle_to-$angle_from)>0.05) {
- array_push($string_placement, array($angle_from,$angle_to));
+ if( ($angle_to*360) - ($angle_from*360) >= 1) {
+ fill_arc($image,$x,$y,$size,$angle_from*360,$angle_to*360,$col_black,$col_green);
+ if (($angle_to-$angle_from)>0.05) {
+ array_push($string_placement, array($angle_from,$angle_to));
+ }
}
$angle_from = $angle_to;
$ptr = $block['offset']+$block['size'];