Pop\Image\Svg::setFillColor PHP Метод

setFillColor() публичный Метод

Set the fill color.
public setFillColor ( Pop\Color\Space\ColorInterface $color = null ) : Svg
$color Pop\Color\Space\ColorInterface
Результат Svg
    public function setFillColor(ColorInterface $color = null)
    {
        $this->curGradient = null;
        $this->fillColor = $color;
        return $this;
    }

Usage Example

Пример #1
0
 public function testAddPolygon()
 {
     $s = new Svg('graph.svg', '640px', '480px');
     $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));
     $s->setStrokeColor(new Rgb(0, 0, 0))->drawPolygon($points);
     $s->setBackgroundColor(new Rgb(255, 0, 0));
     $s->drawPolygon($points);
     $s->setFillColor(new Rgb(255, 0, 0));
     $s->drawPolygon($points);
     $this->assertEquals(640, $s->getWidth());
 }
All Usage Examples Of Pop\Image\Svg::setFillColor