Laravolt\Avatar\Avatar::buildAvatar PHP Method

buildAvatar() protected method

protected buildAvatar ( )
    protected function buildAvatar()
    {
        $x = $this->width / 2;
        $y = $this->height / 2;
        $manager = new ImageManager(array('driver' => config('avatar.driver')));
        $this->image = $manager->canvas($this->width, $this->height);
        $this->createShape();
        $this->chooseFont();
        $this->image->text($this->initials, $x, $y, function (AbstractFont $font) {
            $font->file($this->font);
            $font->size($this->fontSize);
            $font->color($this->foreground);
            $font->align('center');
            $font->valign('middle');
        });
    }