From b7bda087100e01b015d5ce835ec6fd7f4ca9d429 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 11 Feb 2006 21:05:57 +0000 Subject: [PATCH] - Increasing colour library - Change the colour of the pie outline --- graph_pie.php | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/graph_pie.php b/graph_pie.php index 9589dec..d92338f 100644 --- a/graph_pie.php +++ b/graph_pie.php @@ -115,6 +115,7 @@ class Graph_Pie { $colours['black'] = imagecolorallocate($this->image, 0, 0, 0); $colours['white'] = imagecolorallocate($this->image, 255, 255, 255); + $colours['grey'] = imagecolorallocate($this->image, 121, 121, 123); $graphpadding = 10; $graphspacing = 4; @@ -148,7 +149,7 @@ class Graph_Pie { $deg = (360 / 100) * $plot[1]; imagefilledarc($this->image, $center['x'], $center['y'], $diameter, $diameter, $lastdeg, $deg + $lastdeg, $plot[2], IMG_ARC_PIE); - imagefilledarc($this->image, $center['x'], $center['y'], $diameter, $diameter, $lastdeg, $deg + $lastdeg, $colours['black'], IMG_ARC_EDGED | IMG_ARC_NOFILL); + imagefilledarc($this->image, $center['x'], $center['y'], $diameter, $diameter, $lastdeg, $deg + $lastdeg, $colours['grey'], IMG_ARC_EDGED | IMG_ARC_NOFILL); $lastdeg += $deg; if ($this->legend) @@ -168,7 +169,7 @@ class Graph_Pie } // draw the ellipse (do here so it cleans up the arc edges) - imageellipse($this->image, $center['x'], $center['y'], $diameter, $diameter, $colours['black']); + imageellipse($this->image, $center['x'], $center['y'], $diameter, $diameter, $colours['grey']); // do the legend if ($this->legend) @@ -245,12 +246,18 @@ class Graph_Pie function fetch_colour() { static $colourlist = array( - array(255, 0, 0), - array(100, 0, 0), - array(0, 255, 0), - array(0, 100, 0), - array(0, 0, 255), - array(0, 0, 100) + array(100, 60, 175), + array(221, 110, 21), + array(179, 34, 31), + array(69, 196, 243), + array(128, 186, 33), + array(28, 101, 155), + array(246, 204, 95), + array(6, 43, 147), + array(204, 61, 7), + array(170, 169, 174), + array(90, 15, 24), + array(45, 130, 195) ); static $allocated; -- 2.22.5