Lines Matching refs:renderer

35      * @param HtmlRenderer $renderer
40 public function render($renderer, bool $attrib = true): void argument
43 if ($renderer->getCurrentStyle() !== $this->styleName) {
44 $renderer->setCurrentStyle($this->styleName);
46 $temptext = str_replace('#PAGENUM#', (string) $renderer->pageNo(), $this->text);
60 $renderer->write($temptext, $this->color);
63 $startX = $renderer->getX();
64 $startY = $renderer->getY();
65 $width = $renderer->getRemainingWidth();
67 if ($renderer->getStringWidth($temptext) > $width) {
70 …echo '<div style="position:absolute;top:', $startY, 'pt;', $renderer->alignRTL, ':', $startX, 'pt;…
71 $line = $renderer->textWrap($line, $width);
72 $startY += $renderer->getTextCellHeight($line);
73 $renderer->setY($startY);
74 $renderer->write($line, $this->color);
78 …echo '<div style="position:absolute;top:', $startY, 'pt;', $renderer->alignRTL, ':', $startX, 'pt;…
79 $renderer->write($temptext, $this->color);
81 $renderer->setX($startX + $renderer->getStringWidth($temptext));
82 if ($renderer->countLines($temptext) !== 1) {
83 $renderer->setXy(0, $startY + $renderer->getTextCellHeight($temptext));
94 * @param HtmlRenderer $renderer
98 public function getHeight($renderer): float argument
104 $style = $renderer->getStyle($this->styleName);
106 return $style['size'] * $ct * $renderer->cellHeightRatio;
112 * @param HtmlRenderer $renderer
116 public function getWidth($renderer): array argument
119 if ($renderer->getCurrentStyle() !== $this->styleName) {
120 $renderer->setCurrentStyle($this->styleName);
124 $fsize = $renderer->getCurrentStyleHeight();
125 if ($fsize > $renderer->largestFontHeight) {
126 $renderer->largestFontHeight = $fsize;
130 $lw = $renderer->getStringWidth($this->text);
132 $lfct = $renderer->countLines($this->text);
143 $lw = $renderer->getStringWidth($line);
151 $lw += $renderer->getStringWidth($word . ' ');
158 $lw = $renderer->getStringWidth($word . ' ');