Skip to content

Commit

Permalink
phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Sep 18, 2023
1 parent a68f9de commit e98bd5d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
16 changes: 4 additions & 12 deletions lib/Varien/Image/Adapter/Gd2.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,20 +412,12 @@ public function resize($frameWidth = null, $frameHeight = null)
$this->_resized = true;
}

/**
* @param $angle float
* @return void
*/
public function rotate($angle)
{
/*
$isAlpha = false;
$backgroundColor = $this->_getTransparency($this->_imageHandler, $this->_fileType, $isAlpha);
list($r, $g, $b) = $this->_backgroundColor;
if ($isAlpha) {
$backgroundColor = imagecolorallocatealpha($this->_imageHandler, 0, 0, 0, 127);
}
elseif (false === $backgroundColor) {
$backgroundColor = imagecolorallocate($this->_imageHandler, $r, $g, $b);
}
$this->_imageHandler = imagerotate($this->_imageHandler, $angle, $backgroundColor);
//*/
$this->_imageHandler = imagerotate($this->_imageHandler, $angle, $this->imageBackgroundColor);
$this->refreshImageDimensions();
}
Expand Down
5 changes: 5 additions & 0 deletions lib/Varien/Image/Adapter/Imagick.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ public function resize($frameWidth = null, $frameHeight = null)
$this->_resized = true;
}

/**
* @param $angle float
* @return void
* @throws ImagickException
*/
public function rotate($angle)
{
$this->_imageHandler->rotateImage($this->imageBackgroundColor, $angle);
Expand Down

0 comments on commit e98bd5d

Please sign in to comment.