| @@ 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; |
|
| @@ 102-105 (lines=4) @@ | ||
| 99 | $x = 0; |
|
| 100 | $y = ($size->getHeight() - $watermarkSize->getHeight()) / 2; |
|
| 101 | break; |
|
| 102 | case 'center': |
|
| 103 | $x = ($size->getWidth() - $watermarkSize->getWidth()) / 2; |
|
| 104 | $y = ($size->getHeight() - $watermarkSize->getHeight()) / 2; |
|
| 105 | break; |
|
| 106 | case 'right': |
|
| 107 | $x = $size->getWidth() - $watermarkSize->getWidth(); |
|
| 108 | $y = ($size->getHeight() - $watermarkSize->getHeight()) / 2; |
|
| @@ 106-109 (lines=4) @@ | ||
| 103 | $x = ($size->getWidth() - $watermarkSize->getWidth()) / 2; |
|
| 104 | $y = ($size->getHeight() - $watermarkSize->getHeight()) / 2; |
|
| 105 | break; |
|
| 106 | case 'right': |
|
| 107 | $x = $size->getWidth() - $watermarkSize->getWidth(); |
|
| 108 | $y = ($size->getHeight() - $watermarkSize->getHeight()) / 2; |
|
| 109 | break; |
|
| 110 | case 'bottomleft': |
|
| 111 | $x = 0; |
|
| 112 | $y = $size->getHeight() - $watermarkSize->getHeight(); |
|
| @@ 114-117 (lines=4) @@ | ||
| 111 | $x = 0; |
|
| 112 | $y = $size->getHeight() - $watermarkSize->getHeight(); |
|
| 113 | break; |
|
| 114 | case 'bottom': |
|
| 115 | $x = ($size->getWidth() - $watermarkSize->getWidth()) / 2; |
|
| 116 | $y = $size->getHeight() - $watermarkSize->getHeight(); |
|
| 117 | break; |
|
| 118 | case 'bottomright': |
|
| 119 | $x = $size->getWidth() - $watermarkSize->getWidth(); |
|
| 120 | $y = $size->getHeight() - $watermarkSize->getHeight(); |
|
| @@ 118-121 (lines=4) @@ | ||
| 115 | $x = ($size->getWidth() - $watermarkSize->getWidth()) / 2; |
|
| 116 | $y = $size->getHeight() - $watermarkSize->getHeight(); |
|
| 117 | break; |
|
| 118 | case 'bottomright': |
|
| 119 | $x = $size->getWidth() - $watermarkSize->getWidth(); |
|
| 120 | $y = $size->getHeight() - $watermarkSize->getHeight(); |
|
| 121 | break; |
|
| 122 | default: |
|
| 123 | throw new \InvalidArgumentException("Unexpected position '{$options['position']}'"); |
|
| 124 | break; |
|