imagefilledpolygon

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Draw a filled polygon
imagefilledpolygon(GdImage $image, array $pointsint $color): bool
    public function applyToImage(Image $image$x 0$y 0)

    {

        
$background = new Color($this->background);

        
imagefilledpolygon($image->getCore(), $this->pointsintval(count($this->points) / 2), $background->getInt());

        

        if (
$this->hasBorder()) {

            
$border_color = new Color($this->border_color);