| @@ 327-340 (lines=14) @@ | ||
| 324 | * |
|
| 325 | * @return $this |
|
| 326 | */ |
|
| 327 | public function setBaseAspecRatio($aspectRatio = null) |
|
| 328 | { |
|
| 329 | $this->log("# Set base for aspect ratio."); |
|
| 330 | ||
| 331 | $this->aspectRatio = $aspectRatio; |
|
| 332 | ||
| 333 | if (!(is_null($this->aspectRatio) || is_numeric($this->aspectRatio))) { |
|
| 334 | throw new Exception("Aspect ratio out of range"); |
|
| 335 | } |
|
| 336 | ||
| 337 | $this->log(" Requested aspectRatio={$this->aspectRatio}."); |
|
| 338 | ||
| 339 | return $this; |
|
| 340 | } |
|
| 341 | ||
| 342 | ||
| 343 | ||
| @@ 353-366 (lines=14) @@ | ||
| 350 | * |
|
| 351 | * @return $this |
|
| 352 | */ |
|
| 353 | public function setBaseDevicePixelRate($dpr = null) |
|
| 354 | { |
|
| 355 | $this->log("# Set base for device pixel rate."); |
|
| 356 | ||
| 357 | $this->dpr = $dpr; |
|
| 358 | ||
| 359 | if (!(is_null($dpr) || (is_numeric($this->dpr) && $this->dpr > 0))) { |
|
| 360 | throw new Exception("Device pixel rate out of range"); |
|
| 361 | } |
|
| 362 | ||
| 363 | $this->log(" Requested dpr={$this->dpr}."); |
|
| 364 | ||
| 365 | return $this; |
|
| 366 | } |
|
| 367 | ||
| 368 | ||
| 369 | ||