Horde_Image_Imagick::roundedRectangle PHP Méthode

roundedRectangle() public méthode

Draws a rounded rectangle.
public roundedRectangle ( integer $x, integer $y, integer $width, integer $height, integer $round, string $color, string $fill )
$x integer The left x-coordinate of the rectangle.
$y integer The top y-coordinate of the rectangle.
$width integer The width of the rectangle.
$height integer The height of the rectangle.
$round integer The width of the corner rounding.
$color string The line color of the rectangle.
$fill string The color to fill the rounded rectangle with.
    public function roundedRectangle($x, $y, $width, $height, $round, $color, $fill)
    {
        try {
            $draw = new ImagickDraw();
            $draw->setStrokeColor(new ImagickPixel($color));
            $draw->setFillColor(new ImagickPixel($fill));
            $draw->roundRectangle($x, $y, $x + $width, $y + $height, $round, $round);
        } catch (ImagickDrawException $e) {
            throw new Horde_Image_Exception($e);
        } catch (ImagickPixelException $e) {
            throw new Horde_Image_Exception($e);
        }
        try {
            $this->_imagick->drawImage($draw);
        } catch (ImagickException $e) {
            throw new Horde_Image_Exception($e);
        }
        $draw->destroy();
    }