1<?php 2 3namespace Mpdf; 4 5class WatermarkImage implements \Mpdf\Watermark 6{ 7 8 const SIZE_DEFAULT = 'D'; 9 const SIZE_FIT_PAGE = 'P'; 10 const SIZE_FIT_FRAME = 'F'; 11 const POSITION_CENTER_PAGE = 'P'; 12 const POSITION_CENTER_FRAME = 'F'; 13 14 /** @var string */ 15 private $path; 16 17 /** @var mixed */ 18 private $size; 19 20 /** @var mixed */ 21 private $position; 22 23 /** @var float */ 24 private $alpha; 25 26 /** @var bool */ 27 private $behindContent; 28 29 /** @var string */ 30 private $alphaBlend; 31 32 public function __construct($path, $size = self::SIZE_DEFAULT, $position = self::POSITION_CENTER_PAGE, $alpha = -1, $behindContent = false, $alphaBlend = 'Normal') 33 { 34 $this->path = $path; 35 $this->size = $size; 36 $this->position = $position; 37 $this->alpha = $alpha; 38 $this->behindContent = $behindContent; 39 $this->alphaBlend = $alphaBlend; 40 } 41 42 public function getPath() 43 { 44 return $this->path; 45 } 46 47 public function getSize() 48 { 49 return $this->size; 50 } 51 52 public function getPosition() 53 { 54 return $this->position; 55 } 56 57 public function getAlpha() 58 { 59 return $this->alpha; 60 } 61 62 public function isBehindContent() 63 { 64 return $this->behindContent; 65 } 66 67 public function getAlphaBlend() 68 { 69 return $this->alphaBlend; 70 } 71 72} 73