]> _ Git - fluidbook_processfarm.git/commitdiff
wip #5220
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 7 Apr 2022 19:48:20 +0000 (21:48 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 7 Apr 2022 19:48:20 +0000 (21:48 +0200)
src/Process.php

index 55b66857e53045b6387e0ffdd71e6050d3a94108..95399af800404d2e1c725427cc9b547f5227b52a 100644 (file)
@@ -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