composer package updates
[openemr.git] / vendor / mpdf / mpdf / src / Tag / DotTab.php
blob278ce38b72fe86a0571eefca2615936bafeefc18
1 <?php
3 namespace Mpdf\Tag;
5 class DotTab extends Tag
8 public function open($attr, &$ahtml, &$ihtml)
10 $objattr = [];
11 $objattr['type'] = 'dottab';
12 $dots = str_repeat('.', 3) . ' '; // minimum number of dots
13 $objattr['width'] = $this->mpdf->GetStringWidth($dots);
14 $objattr['margin_top'] = 0;
15 $objattr['margin_bottom'] = 0;
16 $objattr['margin_left'] = 0;
17 $objattr['margin_right'] = 0;
18 $objattr['height'] = 0;
19 $objattr['colorarray'] = $this->mpdf->colorarray;
20 $objattr['border_top']['w'] = 0;
21 $objattr['border_bottom']['w'] = 0;
22 $objattr['border_left']['w'] = 0;
23 $objattr['border_right']['w'] = 0;
24 $objattr['vertical_align'] = 'BS'; // mPDF 6 DOTTAB
26 $properties = $this->cssManager->MergeCSS('INLINE', 'DOTTAB', $attr);
27 if (isset($properties['OUTDENT'])) {
28 $objattr['outdent'] = $this->sizeConverter->convert(
29 $properties['OUTDENT'],
30 $this->mpdf->blk[$this->mpdf->blklvl]['inner_width'],
31 $this->mpdf->FontSize,
32 false
34 } elseif (isset($attr['OUTDENT'])) {
35 $objattr['outdent'] = $this->sizeConverter->convert(
36 $attr['OUTDENT'],
37 $this->mpdf->blk[$this->mpdf->blklvl]['inner_width'],
38 $this->mpdf->FontSize,
39 false
41 } else {
42 $objattr['outdent'] = 0;
45 $objattr['fontfamily'] = $this->mpdf->FontFamily;
46 $objattr['fontsize'] = $this->mpdf->FontSizePt;
48 $e = "\xbb\xa4\xactype=dottab,objattr=" . serialize($objattr) . "\xbb\xa4\xac";
49 /* -- TABLES -- */
50 // Output it to buffers
51 if ($this->mpdf->tableLevel) {
52 if (!isset($this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['maxs'])) {
53 $this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['maxs'] = $this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['s'];
54 } elseif ($this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['maxs'] < $this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['s']) {
55 $this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['maxs'] = $this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['s'];
57 $this->mpdf->cell[$this->mpdf->row][$this->mpdf->col]['s'] = 0; // reset
58 $this->mpdf->_saveCellTextBuffer($e);
59 } else {
60 /* -- END TABLES -- */
61 $this->mpdf->_saveTextBuffer($e);
62 } // *TABLES*
65 public function close(&$ahtml, &$ihtml)