the first example shows you how proportions work for an ellipse with gd.
Code: Select all
<?php
$im = imagecreate(500, 500);
$background = imagecolorallocate($im, 0xAF, 0xAF, 0xAF);
$black = imagecolorallocate($im, 0, 0, 0);
$white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
$g1 = imagecolorallocate($im, 128, 128, 128);
for ($i=360; $i!=0; $i-=10)
imagefilledarc($im, 150, 120, 200, 100, $i-5, $i, $g1, IMG_ARC_PIE);
for ($i=360; $i!=0; $i-=10)
imagefilledarc($im, 350, 120, 100, 200, $i-5, $i, $g1, IMG_ARC_PIE);
for ($i=360; $i!=0; $i-=10)
imagefilledarc($im, 150, 300, 200, 200, $i-5, $i, $g1, IMG_ARC_PIE);
header ("Content-type: image/png");
imagepng($im);
?>
It's like drawing a circle and then rotate it along the
longer dimension's axis. sectors get smaller near this axis.
Probably all versions of gd handle it this way.