/var/www/flurhymez/vendor/intervention/image/src/Intervention/Image/Gd/Shapes
Edit: /var/www/flurhymez/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/RectangleShape.php (1838B)
x1 = is_numeric($x1) ? intval($x1) : $this->x1;
$this->y1 = is_numeric($y1) ? intval($y1) : $this->y1;
$this->x2 = is_numeric($x2) ? intval($x2) : $this->x2;
$this->y2 = is_numeric($y2) ? intval($y2) : $this->y2;
}
/**
* Draw rectangle to given image at certain position
*
* @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);
imagefilledrectangle($image->getCore(), $this->x1, $this->y1, $this->x2, $this->y2, $background->getInt());
if ($this->hasBorder()) {
$border_color = new Color($this->border_color);
imagesetthickness($image->getCore(), $this->border_width);
imagerectangle($image->getCore(), $this->x1, $this->y1, $this->x2, $this->y2, $border_color->getInt());
}
return true;
}
}