| @@ 69-72 (lines=4) @@ | ||
| 66 | $x = $width - $image->getSize()->getWidth(); |
|
| 67 | $y = ($height - $image->getSize()->getHeight()) / 2; |
|
| 68 | break; |
|
| 69 | case 'center': |
|
| 70 | $x = ($width - $image->getSize()->getWidth()) / 2; |
|
| 71 | $y = ($height - $image->getSize()->getHeight()) / 2; |
|
| 72 | break; |
|
| 73 | case 'centerleft': |
|
| 74 | $x = 0; |
|
| 75 | $y = ($height - $image->getSize()->getHeight()) / 2; |
|
| @@ 90-93 (lines=4) @@ | ||
| 87 | $x = 0; |
|
| 88 | $y = ($size->getHeight() - $watermarkSize->getHeight()) / 2; |
|
| 89 | break; |
|
| 90 | case 'center': |
|
| 91 | $x = ($size->getWidth() - $watermarkSize->getWidth()) / 2; |
|
| 92 | $y = ($size->getHeight() - $watermarkSize->getHeight()) / 2; |
|
| 93 | break; |
|
| 94 | case 'right': |
|
| 95 | $x = $size->getWidth() - $watermarkSize->getWidth(); |
|
| 96 | $y = ($size->getHeight() - $watermarkSize->getHeight()) / 2; |
|
| @@ 94-97 (lines=4) @@ | ||
| 91 | $x = ($size->getWidth() - $watermarkSize->getWidth()) / 2; |
|
| 92 | $y = ($size->getHeight() - $watermarkSize->getHeight()) / 2; |
|
| 93 | break; |
|
| 94 | case 'right': |
|
| 95 | $x = $size->getWidth() - $watermarkSize->getWidth(); |
|
| 96 | $y = ($size->getHeight() - $watermarkSize->getHeight()) / 2; |
|
| 97 | break; |
|
| 98 | case 'bottomleft': |
|
| 99 | $x = 0; |
|
| 100 | $y = $size->getHeight() - $watermarkSize->getHeight(); |
|
| @@ 102-105 (lines=4) @@ | ||
| 99 | $x = 0; |
|
| 100 | $y = $size->getHeight() - $watermarkSize->getHeight(); |
|
| 101 | break; |
|
| 102 | case 'bottom': |
|
| 103 | $x = ($size->getWidth() - $watermarkSize->getWidth()) / 2; |
|
| 104 | $y = $size->getHeight() - $watermarkSize->getHeight(); |
|
| 105 | break; |
|
| 106 | case 'bottomright': |
|
| 107 | $x = $size->getWidth() - $watermarkSize->getWidth(); |
|
| 108 | $y = $size->getHeight() - $watermarkSize->getHeight(); |
|
| @@ 106-109 (lines=4) @@ | ||
| 103 | $x = ($size->getWidth() - $watermarkSize->getWidth()) / 2; |
|
| 104 | $y = $size->getHeight() - $watermarkSize->getHeight(); |
|
| 105 | break; |
|
| 106 | case 'bottomright': |
|
| 107 | $x = $size->getWidth() - $watermarkSize->getWidth(); |
|
| 108 | $y = $size->getHeight() - $watermarkSize->getHeight(); |
|
| 109 | break; |
|
| 110 | default: |
|
| 111 | throw new \InvalidArgumentException("Unexpected position '{$options['position']}'"); |
|
| 112 | break; |
|