![]() |
Pie chart w/ Anti-Aliasing
Since I'm kinda crud at math, how should I make a pie chart with Anti Aliasing, and by math I mean looping through each pixel to make the circular shape of a slice of pie, or so so.
|
Our resident GD guru, Rendair -- who I haven't seen in a while and miss dearly, wrote an article on pie charts with the GD library. Hopefully he'll make a return to TalkPHP and tell us all how to make it anti-aliased!
|
Quote:
|
You're right. Sorry about that, it was a bit late when I posted.
|
There is a way using the Google chart API and I found a nice tut on it to :-P
http://www.talkphp.com/general/1695-...chart-api.html But since we want to make the chart on our own here is what I would suggest to do something like that: PHP Code:
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... |
| All times are GMT. The time now is 08:32 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0