drawEllipse() public method

Method to add an ellipse to the image.
public drawEllipse ( integer $x, integer $y, integer $w, integer $h = null ) : Gd
$x integer
$y integer
$w integer
$h integer
return Gd
示例#1
0
 public function testAddEllipse()
 {
     $i = new Gd(__DIR__ . '/../tmp/test.jpg');
     $i->setStrokeColor(new Rgb(0, 0, 0))->drawEllipse(10, 10, 100, 100);
     $i->setBackgroundColor(new Rgb(255, 0, 0));
     $i->drawEllipse(10, 10, 100, 100);
     $i->setFillColor(new Rgb(255, 0, 0));
     $i->drawEllipse(10, 10, 100, 100);
     $this->assertEquals(640, $i->getWidth());
 }