Exemplo n.º 1
0
 /**
  */
 public function testVisibility()
 {
     $style = new FillStyle();
     $this->assertTrue($style->isVisible());
     $style->setOpacity(0);
     $this->assertFalse($style->isVisible());
     $style->setOpacity(0.1);
     $this->assertTrue($style->isVisible());
 }
Exemplo n.º 2
0
 /**
  * @param SimpleXMLElement $element
  * @param FillStyle $fillStyle
  */
 private function addFillStyle(SimpleXMLElement $element, FillStyle $fillStyle)
 {
     if ($fillStyle->isVisible()) {
         $element->addAttribute("fill", $fillStyle->getColor());
         $element->addAttribute("fill-opacity", $fillStyle->getOpacity());
         $element->addAttribute("fill-rule", "evenodd");
     } else {
         $element->addAttribute("fill", "none");
     }
 }