예제 #1
0
 public function testAddPolygon()
 {
     $i = new Imagick(__DIR__ . '/../tmp/test.jpg');
     $points = array(array('x' => 320, 'y' => 50), array('x' => 400, 'y' => 100), array('x' => 420, 'y' => 200), array('x' => 280, 'y' => 320), array('x' => 200, 'y' => 180));
     $i->setStrokeColor(new Rgb(0, 0, 0))->setStrokeWidth(5)->drawPolygon($points);
     $i->setBackgroundColor(new Rgb(255, 0, 0));
     $i->drawPolygon($points);
     $i->setFillColor(new Rgb(255, 0, 0));
     $i->drawPolygon($points);
     $this->assertEquals(640, $i->getWidth());
 }