Beispiel #1
0
 public function rasterize(SVGRasterizer $rasterizer)
 {
     if ($this->getComputedStyle('display') === 'none') {
         return;
     }
     $visibility = $this->getComputedStyle('visibility');
     if ($visibility === 'hidden' || $visibility === 'collapse') {
         return;
     }
     $d = $this->getDescription();
     if (!isset($d)) {
         return;
     }
     $commands = $rasterizer->getPathParser()->parse($d);
     $subpaths = $rasterizer->getPathApproximator()->approximate($commands);
     foreach ($subpaths as $subpath) {
         $rasterizer->render('polygon', array('open' => true, 'points' => $subpath), $this);
     }
 }