int x=0,mx1=0,mx2=0,my1=0,my2=0;
long aq,bq,dx,dy,r,rx,ry,a,b;
int i;
- int old_y1,old_y2;
+ int old_y2;
a=w>>1;
b=h>>1;
ry = 0;
x = a;
old_y2=-2;
- old_y1=-2;
while (x > 0){
if (r > 0) {
my1++;my2--;
if(old_y2!=my2){
for(i=mx1;i<=mx2;i++){
gdImageSetPixel(im,i,my1,c);
- }
- }
- if(old_y2!=my2){
- for(i=mx1;i<=mx2;i++){
gdImageSetPixel(im,i,my2,c);
}
}
old_y2 = my2;
- old_y1 = my1;
}
}
--- /dev/null
+--TEST--
+Testing imagefilledellipse() of GD library
+--SKIPIF--
+<?php
+if (!extension_loaded("gd")) die("skip GD not present");
+?>
+--FILE--
+<?php
+
+$image = imagecreatetruecolor(100, 100);
+
+$white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
+
+//create an ellipse and fill it with white color
+imagefilledellipse($image, 50, 50, 40, 30, $white);
+
+ob_start();
+imagepng($image);
+$img = ob_get_contents();
+ob_end_clean();
+
+echo md5(base64_encode($img));
+?>
+--EXPECT--
+9ba540bba1b78c9f08efaa6fa0afd93b