. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Report; /** * Class ReportHtmlImage */ class ReportHtmlImage extends ReportBaseImage { /** * Image renderer * * @param ReportHtml $renderer * * @return void */ public function render($renderer) { global $lastpicbottom, $lastpicpage, $lastpicleft, $lastpicright; // Get the current positions if ($this->x === -1) { $this->x = $renderer->getX(); } if ($this->y === -1) { //-- first check for a collision with the last picture if (isset($lastpicbottom)) { if (($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 '