diff --git a/src/Renderer/Image.php b/src/Renderer/Image.php index 4105c062..898c3223 100644 --- a/src/Renderer/Image.php +++ b/src/Renderer/Image.php @@ -397,7 +397,7 @@ protected function drawPolygon($points, $color, $filled = true) $color & 0x0000FF ); - $this->imageFilledPolygonWrapper($this->resource, $newPoints, 4, $allocatedColor, $filled); + $this->imageFilledPolygonWrapper($this->resource, $newPoints, $allocatedColor, $filled); } /** @@ -490,24 +490,16 @@ protected function drawText($text, $size, $position, $font, $color, $alignment = /** * @param GdImage|resource $image * @param array $points - * @param int $numPoints * @param int $color * @param bool $filled * @return bool */ - protected function imageFilledPolygonWrapper($image, array $points, $numPoints, $color, $filled) + protected function imageFilledPolygonWrapper($image, array $points, $color, $filled) { if (! $filled) { - if (PHP_VERSION_ID < 80100) { - return imagepolygon($this->resource, $points, $numPoints, $color); - } return imagepolygon($this->resource, $points, $color); } - if (PHP_VERSION_ID < 80100) { - return imagefilledpolygon($image, $points, $numPoints, $color); - } - return imagefilledpolygon($image, $points, $color); }