Ejemplo n.º 1
0
 public function rasterize(SVGRasterizer $rasterizer)
 {
     if ($this->getComputedStyle('display') === 'none') {
         return;
     }
     $visibility = $this->getComputedStyle('visibility');
     if ($visibility === 'hidden' || $visibility === 'collapse') {
         return;
     }
     $rasterizer->render('polygon', array('open' => false, 'points' => $this->getPoints()), $this);
 }
Ejemplo n.º 2
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);
     }
 }
Ejemplo n.º 3
0
 public function rasterize(SVGRasterizer $rasterizer)
 {
     if ($this->getComputedStyle('display') === 'none') {
         return;
     }
     $visibility = $this->getComputedStyle('visibility');
     if ($visibility === 'hidden' || $visibility === 'collapse') {
         return;
     }
     $r = $this->getRadius();
     $rasterizer->render('ellipse', array('cx' => $this->getCenterX(), 'cy' => $this->getCenterY(), 'rx' => $r, 'ry' => $r), $this);
 }
Ejemplo n.º 4
0
 public function rasterize(SVGRasterizer $rasterizer)
 {
     if ($this->getComputedStyle('display') === 'none') {
         return;
     }
     $visibility = $this->getComputedStyle('visibility');
     if ($visibility === 'hidden' || $visibility === 'collapse') {
         return;
     }
     $rasterizer->render('line', array('x1' => $this->getX1(), 'y1' => $this->getY1(), 'x2' => $this->getX2(), 'y2' => $this->getY2()), $this);
 }
Ejemplo n.º 5
0
 public function rasterize(SVGRasterizer $rasterizer)
 {
     if ($this->getComputedStyle('display') === 'none') {
         return;
     }
     $visibility = $this->getComputedStyle('visibility');
     if ($visibility === 'hidden' || $visibility === 'collapse') {
         return;
     }
     $rasterizer->render('rect', array('x' => $this->getX(), 'y' => $this->getY(), 'width' => $this->getWidth(), 'height' => $this->getHeight()), $this);
 }