| @@ 193-209 (lines=17) @@ | ||
| 190 | $gifCreator->start($val, $this->menuArr[$key]); |
|
| 191 | } |
|
| 192 | // If max dimensions are specified |
|
| 193 | if ($maxDim) { |
|
| 194 | $tempXY = explode(',', $val['XY']); |
|
| 195 | if ($maxDim[0] && $Wcounter + $gifCreator->XY[0] >= $maxDim[0]) { |
|
| 196 | $tempXY[0] = $maxDim[0] - $Wcounter; |
|
| 197 | $maxFlag = 1; |
|
| 198 | } |
|
| 199 | if ($maxDim[1] && $Hcounter + $gifCreator->XY[1] >= $maxDim[1]) { |
|
| 200 | $tempXY[1] = $maxDim[1] - $Hcounter; |
|
| 201 | $maxFlag = 1; |
|
| 202 | } |
|
| 203 | if ($maxFlag) { |
|
| 204 | $val['XY'] = implode(',', $tempXY); |
|
| 205 | $gifCreator = GeneralUtility::makeInstance(GifBuilder::class); |
|
| 206 | $gifCreator->init(); |
|
| 207 | $gifCreator->start($val, $this->menuArr[$key]); |
|
| 208 | } |
|
| 209 | } |
|
| 210 | // displace |
|
| 211 | if ($Hobjs) { |
|
| 212 | foreach ($Hobjs as $index) { |
|
| @@ 326-342 (lines=17) @@ | ||
| 323 | $gifCreator = GeneralUtility::makeInstance(GifBuilder::class); |
|
| 324 | $gifCreator->init(); |
|
| 325 | $gifCreator->start($val, $this->menuArr[$key]); |
|
| 326 | if ($maxDim) { |
|
| 327 | $tempXY = explode(',', $val['XY']); |
|
| 328 | if ($maxDim[0] && $Wcounter + $gifCreator->XY[0] >= $maxDim[0]) { |
|
| 329 | $tempXY[0] = $maxDim[0] - $Wcounter; |
|
| 330 | $maxFlag = 1; |
|
| 331 | } |
|
| 332 | if ($maxDim[1] && $Hcounter + $gifCreator->XY[1] >= $maxDim[1]) { |
|
| 333 | $tempXY[1] = $maxDim[1] - $Hcounter; |
|
| 334 | $maxFlag = 1; |
|
| 335 | } |
|
| 336 | if ($maxFlag) { |
|
| 337 | $val['XY'] = implode(',', $tempXY); |
|
| 338 | $gifCreator = GeneralUtility::makeInstance(GifBuilder::class); |
|
| 339 | $gifCreator->init(); |
|
| 340 | $gifCreator->start($val, $this->menuArr[$key]); |
|
| 341 | } |
|
| 342 | } |
|
| 343 | // SAME CODE AS makeGifs()! END |
|
| 344 | // Setting the width/height |
|
| 345 | $totalWH['W'][$key] = $gifCreator->XY[0]; |
|