芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/vendor/intervention/image/src/Intervention/Image/Gd/Shapes/RectangleShape.php
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; } }