| @@ 321-334 (lines=14) @@ | ||
| 318 | * |
|
| 319 | * @return $this |
|
| 320 | */ |
|
| 321 | public function setBaseAspecRatio($aspectRatio = null) |
|
| 322 | { |
|
| 323 | $this->log("# Set base for aspect ratio."); |
|
| 324 | ||
| 325 | $this->aspectRatio = $aspectRatio; |
|
| 326 | ||
| 327 | if (!(is_null($this->aspectRatio) || is_numeric($this->aspectRatio))) { |
|
| 328 | throw new Exception("Aspect ratio out of range"); |
|
| 329 | } |
|
| 330 | ||
| 331 | $this->log(" Requested aspectRatio={$this->aspectRatio}."); |
|
| 332 | ||
| 333 | return $this; |
|
| 334 | } |
|
| 335 | ||
| 336 | ||
| 337 | ||
| @@ 347-360 (lines=14) @@ | ||
| 344 | * |
|
| 345 | * @return $this |
|
| 346 | */ |
|
| 347 | public function setBaseDevicePixelRate($dpr = null) |
|
| 348 | { |
|
| 349 | $this->log("# Set base for device pixel rate."); |
|
| 350 | ||
| 351 | $this->dpr = $dpr; |
|
| 352 | ||
| 353 | if (!(is_null($dpr) || (is_numeric($this->dpr) && $this->dpr > 0))) { |
|
| 354 | throw new Exception("Device pixel rate out of range"); |
|
| 355 | } |
|
| 356 | ||
| 357 | $this->log(" Requested dpr={$this->dpr}."); |
|
| 358 | ||
| 359 | return $this; |
|
| 360 | } |
|
| 361 | ||
| 362 | ||
| 363 | ||