At my full-time design and development job, I’ve recently been starting to learn the ropes of PHP. I’ve always had interest in PHP, as well as some basic knowledge of its structure and some functions.
Anyway, for a couple projects I’ve had to learn more about the image functions built into PHP. They’re pretty amazing – ability to create full-fledged images out of many variables, other images, text, dynamic content, etc.
One fantastic tool I found while researching how to create graphs is an Anti-Alias Arcs script by Ulrich Mierendorff. Here’s a blurb about it:
In many cases websites need dynamically created images: pie charts, rounded corners, menu buttons, etc. This list is endless. PHP, or more precisely the GD library, provides filled elliptical arcs, but they are not antialiased. Therefore I have written a function to render filled antialiased elliptical arcs or filled antialiased ellipses (as well as circles..) with PHP easily. Drawing these filled arcs is now a one-liner.
Here’s a neat graph I made using Ulrich’s script, with the help of some example code and the PHP Manual:

Hope this has helped you in your efforts to create visually-appealing arcs in your PHP-generated images
And thanks Ulrich for the great script! You can learn more about him at http://mierendo.com/
Subscribe
