Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function apply(ImageInterface $image)
 {
     $size = $image->getSize();
     $width = $size->getWidth();
     $height = $size->getHeight();
     $draw = $image->draw();
     // Draw top and bottom lines
     $draw->line(new Point(0, 0), new Point($width - 1, 0), $this->color, $this->height)->line(new Point($width - 1, $height - 1), new Point(0, $height - 1), $this->color, $this->height);
     // Draw sides
     $draw->line(new Point(0, 0), new Point(0, $height - 1), $this->color, $this->width)->line(new Point($width - 1, 0), new Point($width - 1, $height - 1), $this->color, $this->width);
     return $image;
 }