ManaPHP\Image\Adapter\Imagick::rotate PHP Метод

rotate() публичный Метод

Rotate the image by a given degrees
public rotate ( integer $degrees, integer $background = 16777215, float $alpha = 1 ) : static
$degrees integer
$background integer
$alpha float
Результат static
    public function rotate($degrees, $background = 0xffffff, $alpha = 1.0)
    {
        $backgroundColor = sprintf('rgba(%u,%u,%u,%f)', $background >> 16 & 0xff, $background >> 8 & 0xff, $background & 0xff, $alpha);
        $this->_image->rotateImage(new \ImagickPixel($backgroundColor), $degrees);
        $this->_image->setImagePage($this->_width, $this->_height, 0, 0);
        $this->_width = $this->_image->getImageWidth();
        $this->_height = $this->_image->getImageHeight();
        return $this;
    }