View Single Post
Old 12-07-2008, 06:58 PM   #5 (permalink)
c-through
The Wanderer
 
c-through's Avatar
 
Join Date: Nov 2008
Posts: 13
Thanks: 0
c-through is on a distinguished road
Default

There is a way using the Google chart API and I found a nice tut on it to
Creating a three dimensional pie chart using Google's Chart API
But since we want to make the chart on our own here is what I would suggest to do something like that:

PHP Code:
header('Content-type: image/png');
$handle imagecreate(200,200);
$background=imagecolorallocate($handle,000,000,000);
$red=imagecolorallocate($handle,255,0,0);
$green=imagecolorallocate($handle,0,255,0);
$blue=imagecolorallocate($handle,0,0,255);
imagefilledarc($handle,100,100,200,200,0,90,$greenIMG_ARC_PIE);
imagefilledarc($handle,100,100,200,200,90,240,$redIMG_ARC_PIE);
imagefilledarc($handle,100,100,200,200,240,360,$blueIMG_ARC_PIE);
imagepng($handle); 
Just saw you are looking for an antialiasing solution...
Ok forget the script on top, one way would be supersampling, but creating a aa image from scratch Don't have an good solution in my mind (Having a serious hangover, and need some sleep). But I do have a script from someone else creating antialiased arcs as far as I remember. Maybe you can use it?!

http://pastebin.com/m6fdecadf

And now I take some Panado and go sleep...
__________________
Hello World!

Last edited by c-through : 12-07-2008 at 07:19 PM.
c-through is offline  
Reply With Quote