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