PHP: creating a smooth edged circle, image or font?

Posted by Chad Whitaker on Stack Overflow See other posts from Stack Overflow or by Chad Whitaker
Published on 2010-03-14T23:51:43Z Indexed on 2010/03/14 23:59 UTC
Read the original article Hit count: 210

Filed under:
|
|
|
|

I'm making a PHP image script that will create circles at a given radius.

I used:

<?php
imagefilledellipse ( $image, $cx, $cy, $w, $h, $color );
?>

but hate the rough edges it produces. So I was thinking of making or using a circle font that I will output using:

<?php
 imagettftext ( $image, $size, $angle, $x, $y, $color, 'fontfile.ttf', $text );
?>

So that the font will produce a circle that has a smooth edge. My problem is making the "font size" match the "radius size".

Any ideas? Or maybe a PHP class that will produce a smooth edge on a circle would be great!

Thank you.

© Stack Overflow or respective owner

Related posts about php

Related posts about font