. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Report; /** * Class ReportHtmlLine */ class ReportHtmlLine extends ReportBaseLine { /** * HTML line renderer * * @param ReportHtml $renderer * * @return void */ public function render($renderer) { if ($this->x1 === ReportBaseElement::CURRENT_POSITION) { $this->x1 = $renderer->getX(); } if ($this->y1 === ReportBaseElement::CURRENT_POSITION) { $this->y1 = $renderer->getY(); } if ($this->x2 === ReportBaseElement::CURRENT_POSITION) { $this->x2 = $renderer->getRemainingWidth(); } if ($this->y2 === ReportBaseElement::CURRENT_POSITION) { $this->y2 = $renderer->getY(); } // Vertical line if ($this->x1 == $this->x2) { echo '
\n"; } // Horizontal line if ($this->y1 == $this->y2) { echo '
\n"; } // Keep max Y updated // One or the other will be higher... lasy mans way... $renderer->addMaxY($this->y1); $renderer->addMaxY($this->y2); } }