/var/www/flurhymez/vendor/intervention/image/src/Intervention/Image/Gd/Shapes
Edit: /var/www/flurhymez/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/PolygonShape.php (1200B)
points = $points;
}
/**
* Draw polygon on given image
*
* @param Image $image
* @param int $x
* @param int $y
* @return boolean
*/
public function applyToImage(Image $image, $x = 0, $y = 0)
{
$background = new Color($this->background);
imagefilledpolygon($image->getCore(), $this->points, intval(count($this->points) / 2), $background->getInt());
if ($this->hasBorder()) {
$border_color = new Color($this->border_color);
imagesetthickness($image->getCore(), $this->border_width);
imagepolygon($image->getCore(), $this->points, intval(count($this->points) / 2), $border_color->getInt());
}
return true;
}
}