composer package updates
[openemr.git] / vendor / mpdf / mpdf / src / Tag / WatermarkImage.php
blob21f8c48b594af5470b8072e7fd2a56bc4fff2e41
1 <?php
3 namespace Mpdf\Tag;
5 class WatermarkImage extends Tag
8 public function open($attr, &$ahtml, &$ihtml)
10 $src = '';
11 if (isset($attr['SRC'])) {
12 $src = $attr['SRC'];
15 $alpha = -1;
16 if (isset($attr['ALPHA']) && $attr['ALPHA'] > 0) {
17 $alpha = $attr['ALPHA'];
20 $size = 'D';
21 if (!empty($attr['SIZE'])) {
22 $size = $attr['SIZE'];
23 if (strpos($size, ',')) {
24 $size = explode(',', $size);
28 $pos = 'P';
29 if (!empty($attr['POSITION'])) { // mPDF 5.7.2
30 $pos = $attr['POSITION'];
31 if (strpos($pos, ',')) {
32 $pos = explode(',', $pos);
35 $this->mpdf->SetWatermarkImage($src, $alpha, $size, $pos);
38 public function close(&$ahtml, &$ihtml)