. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Report; /** * Class ReportHtmlImage */ class ReportHtmlImage extends ReportBaseImage { /** * Image renderer * * @param HtmlRenderer $renderer * * @return void */ public function render($renderer): void { static $lastpicbottom, $lastpicpage, $lastpicleft, $lastpicright; // Get the current positions if ($this->x === ReportBaseElement::CURRENT_POSITION) { $this->x = $renderer->getX(); } if ($this->y === ReportBaseElement::CURRENT_POSITION) { //-- first check for a collision with the last picture if ($lastpicbottom !== null && $renderer->pageNo() === $lastpicpage && $lastpicbottom >= $renderer->getY() && $this->x >= $lastpicleft && $this->x <= $lastpicright) { $renderer->setY($lastpicbottom + $renderer->cPadding * 2); } $this->y = $renderer->getY(); } // Image alignment switch ($this->align) { case 'L': echo '