Skip to content

Commit

Permalink
fix wrong dimension for square
Browse files Browse the repository at this point in the history
  • Loading branch information
uyab committed Nov 17, 2017
1 parent bfd368b commit 929d7e5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Avatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,11 @@ function (AbstractShape $draw) {

protected function createSquareShape()
{
$x = $y = $this->borderSize;
$width = $this->width - ($this->borderSize * 2);
$height = $this->height - ($this->borderSize * 2);
$edge = (ceil($this->borderSize / 2));
$x = $y = $edge;
$width = $this->width - $edge;
$height = $this->height - $edge;

$this->image->rectangle(
$x,
$y,
Expand Down

0 comments on commit 929d7e5

Please sign in to comment.