Пример #1
0
 public function onPointLoop(SvgRenderer $svgRender, Trajet $trajet, IPoint $point, $precPoint, $index)
 {
     $this->minX = $this->minX > $point->getX() ? $point->getX() : $this->minX;
     $this->minZ = $this->minZ > $point->getZ() ? $point->getZ() : $this->minZ;
     $this->maxX = $this->maxX < $point->getX() ? $point->getX() : $this->maxX;
     $this->maxZ = $this->maxZ < $point->getZ() ? $point->getZ() : $this->maxZ;
 }
Пример #2
0
 public function onPointLoop(SvgRenderer $svgRender, Trajet $trajet, IPoint $point, $precPoint, $index)
 {
     if ($point instanceof PointInteret) {
         $svgCircle = new SvgNode('circle', true);
         $svgCircle->addAttribut(array('cx' => $point->getX()));
         $svgCircle->addAttribut(array('cy' => $point->getZ()));
         $svgCircle->addAttribut(array('r' => 12));
         $svgCircle->addAttribut(array('stroke' => 'orange'));
         $svgCircle->addAttribut(array('stroke-width' => 2));
         $svgCircle->addAttribut(array('fill' => 'limegreen'));
         $text = new SvgNode('text', false);
         $text->addAttribut(array('x' => $point->getX() + 15));
         $text->addAttribut(array('y' => $point->getZ() + 10));
         $text->addAttribut(array('style' => 'fill: orange; stroke: orange; stroke-width: 0px; font-size: 30px; font-weight: bold;'));
         $text->setTexte($point->getNom());
         $svgRender->addNoeud($text, 3);
         $svgRender->addNoeud($svgCircle, 2);
     }
 }
Пример #3
0
 /**
  * Ajoute l'instruction de dessin de la ligne ayant pour point de départ $precPpoint
  * et pour point d'arrivée $point au path
  * @param SvgRenderer $svgRender
  * @param Trajet $trajet
  * @param IPoint $point
  * @param IPoint $pointPrec
  * @param $index
  */
 public function onPointLoop(SvgRenderer $svgRender, Trajet $trajet, IPoint $point, $pointPrec, $index)
 {
     if ($pointPrec !== null) {
         $this->pathLine = $this->pathLine . 'M' . $pointPrec->getX() . ',' . $pointPrec->getZ() . ' ' . 'L' . $point->getX() . ',' . $point->getZ() . ' ';
     }
 }