Draw Filled Ellipse in PHP

Description

The following code shows how to draw Filled Ellipse.

Example


<?php/*from  w  w w . ja v a2 s  . co m*/
$myImage = ImageCreateFromPNG ("test.png");

$c = ImageColorAllocate ($myImage, 2, 255, 255);

ImageFilledEllipse($myImage, 10, 7, 20, 20, $c);
ImageFilledEllipse($myImage, 15, 7, 20, 20, $c);
ImageFilledEllipse($myImage, 20, 7, 20, 20, $c);

header ("Content-type: image/png");
ImagePNG($myImage);

ImageDestroy($myImage);
?>

The code above generates the following result.

Draw Filled Ellipse in PHP




















Home »
  PHP Tutorial »
    Image »




Color
Create
Font
Operation
Shape
Text