7 class Legend
extends Tag
10 public function open($attr, &$ahtml, &$ihtml)
12 $this->mpdf
->InlineProperties
['LEGEND'] = $this->mpdf
->saveInlineProperties();
13 $properties = $this->cssManager
->MergeCSS('INLINE', 'LEGEND', $attr);
14 if (!empty($properties)) {
15 $this->mpdf
->setCSS($properties, 'INLINE');
19 public function close(&$ahtml, &$ihtml)
21 if (count($this->mpdf
->textbuffer
) && !$this->mpdf
->tableLevel
) {
22 $leg = $this->mpdf
->textbuffer
[count($this->mpdf
->textbuffer
) - 1];
23 unset($this->mpdf
->textbuffer
[count($this->mpdf
->textbuffer
) - 1]);
24 $this->mpdf
->textbuffer
= array_values($this->mpdf
->textbuffer
);
25 $this->mpdf
->blk
[$this->mpdf
->blklvl
]['border_legend'] = $leg;
26 $this->mpdf
->blk
[$this->mpdf
->blklvl
]['margin_top'] +
= ($leg[11] / 2) / Mpdf
::SCALE
;
27 $this->mpdf
->blk
[$this->mpdf
->blklvl
]['padding_top'] +
= ($leg[11] / 2) / Mpdf
::SCALE
;
29 if (isset($this->mpdf
->InlineProperties
['LEGEND'])) {
30 $this->mpdf
->restoreInlineProperties($this->mpdf
->InlineProperties
['LEGEND']);
32 unset($this->mpdf
->InlineProperties
['LEGEND']);
33 $this->mpdf
->ignorefollowingspaces
= true; //Eliminate exceeding left-side spaces