From: Vincent Vanwaelscappel Date: Thu, 7 Apr 2022 19:48:20 +0000 (+0200) Subject: wip #5220 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c69944a03ebb24beafd364e22efec9ed53d1e017;p=fluidbook_processfarm.git wip #5220 --- diff --git a/src/Process.php b/src/Process.php index 55b6685..95399af 100644 --- a/src/Process.php +++ b/src/Process.php @@ -9,15 +9,46 @@ class Process extends ProcessFile protected $page; protected $out; protected $force = false; + protected $mobileRatio = 1; + protected $resolutionRatio = 1; - public function __construct($out, $page, $format = 'jpg', $resolution = 150, $withGraphics = true, $withTexts = true, $version = 'html', $force = false) + public function __construct($out, $page, $resolutionRatio, $mobileRatio, $format = 'jpg', $resolution = 150, $withGraphics = true, $withTexts = true, $version = 'html', $force = false) { $this->setOut($out); $this->setPage($page); $this->setForce(!!$force); + $this->setResolutionRatio($resolutionRatio); + $this->setMobileRatio($mobileRatio); parent::__construct($format, $resolution, $withGraphics, $withTexts, $version); } + /** + * @param float $mobileRatio + */ + public function setMobileRatio(float $mobileRatio): void + { + $this->mobileRatio = $mobileRatio; + } + + /** + * @param float $resolutionRatio + */ + public function setResolutionRatio(float $resolutionRatio): void + { + $this->resolutionRatio = $resolutionRatio; + } + + public function getMobileRatio(): float + { + return $this->mobileRatio; + } + + public function getResolutionRatio(): float + { + return $this->resolutionRatio; + } + + /** * @return bool */ @@ -75,5 +106,4 @@ class Process extends ProcessFile return $this->getPath($this->isForce()); } - } \ No newline at end of file