Skip to content

Commit

Permalink
rename rectangle width param to thickness
Browse files Browse the repository at this point in the history
  • Loading branch information
antonlukin committed Apr 23, 2021
1 parent 1f5b3a4 commit 29a2648
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "antonlukin/poster-image",
"version": "2.2",
"version": "2.3",
"description": "Wrapper for PHP's GD Library for easy image manipulation",
"keywords": ["php", "image", "text", "gd"],
"homepage": "https://github.com/antonlukin/poster-image",
Expand Down
10 changes: 5 additions & 5 deletions src/PosterImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,18 +521,18 @@ public function line($x1, $y1, $x2, $y2, $options = array())
public function rectangle($x, $y, $width, $height, $options = array())
{
$defaults = array(
'color' => array(0, 0, 0),
'opacity' => 0,
'width' => 1,
'outline' => false,
'color' => array(0, 0, 0),
'opacity' => 0,
'thickness' => 1,
'outline' => false,
);

$options = array_merge($defaults, $options);

// Get color from options.
$color = $this->getColor($options);

imagesetthickness($this->resource, $options['width']);
imagesetthickness($this->resource, $options['thickness']);

if (true === $options['outline']) {
imagerectangle($this->resource, $x, $y, $x + $width, $y + $height, $color);
Expand Down

0 comments on commit 29a2648

Please sign in to comment.