Laravolt\Avatar\Avatar::createSquareShape PHP Method

createSquareShape() protected method

protected createSquareShape ( )
    protected function createSquareShape()
    {
        $x = $y = $this->borderSize;
        $width = $this->width - $this->borderSize * 2;
        $height = $this->height - $this->borderSize * 2;
        $this->image->rectangle($x, $y, $width, $height, function (AbstractShape $draw) {
            $draw->background($this->background);
            $draw->border($this->borderSize, $this->getBorderColor());
        });
    }