Pop\Image\Imagick::border PHP Метод

border() публичный Метод

Method to add a border to the image.
public border ( integer $w, integer $h = null, integer $type = Imagick::INNER_BORDER ) : Imagick
$w integer
$h integer
$type integer
Результат Imagick
    public function border($w, $h = null, $type = Imagick::INNER_BORDER)
    {
        $h = null === $h ? $w : $h;
        if ($type == self::INNER_BORDER) {
            $this->setStrokeWidth($h * 2);
            $this->drawLine(0, 0, $this->width, 0);
            $this->drawLine(0, $this->height, $this->width, $this->height);
            $this->setStrokeWidth($w * 2);
            $this->drawLine(0, 0, 0, $this->height);
            $this->drawLine($this->width, 0, $this->width, $this->height);
        } else {
            $this->resource->borderImage($this->setColor($this->strokeColor), $w, $h);
        }
        return $this;
    }