Do not print markers outside the image.

This commit is contained in:
Malte Hübner 2018-02-17 01:39:30 +01:00
parent 6d4d17f3ed
commit a549247a11
1 changed files with 3 additions and 1 deletions

View File

@ -75,7 +75,9 @@ class ExtraMarkerPrinter
$point = new Point($destX, $destY);
$markerImage->paste($canvas->getImage(), $point);
if ($canvas->getImage()->getSize()->contains($markerImage->getSize(), $point)) {
$markerImage->paste($canvas->getImage(), $point);
}
return $this;
}