PHP | ImagickDraw roundRectangle() Function Last Updated : 30 Aug, 2019 Comments Improve Suggest changes Like Article Like Report The ImagickDraw::roundRectangle() function is an inbuilt function in Imagick library of PHP which is used to draw a rounded rectangle. Syntax: bool ImagickDraw::roundRectangle( $x1, $y1, $x2, $y2, $rx, $ry ) Parameters: This function accept six parameters as mentioned above and described below: $x1: This parameter takes the value of x coordinate of the top left corner. $y1: This parameter takes the value of y coordinate of the top left corner. $x2: This parameter takes the value of x coordinate of the bottom right. $y2: This parameter takes the value of y coordinate of the bottom right. $rx: This parameter takes the value of x rounding. $ry: This parameter takes the value of y rounding. Return Value: This function returns TRUE on success. Below program illustrates the ImagickDraw::roundRectangle() function in PHP: Program: php <?php // require_once('vendor/autoload.php'); // Create ImagickDraw object $draw = new \ImagickDraw(); $draw->setStrokeColor('Green'); $draw->setFillColor('Red'); $draw->setStrokeWidth(7); $draw->roundRectangle(40, 30, 250, 260, 40, 80); // Create an image object which the draw // commands can be rendered into $image = new \Imagick(); $image->newImage(300, 300, 'White'); $image->setImageFormat("png"); // Render the draw commands in the ImagickDraw object // into the image. $image->drawImage($draw); // Send the image to the browser header("Content-Type: image/png"); echo $image->getImageBlob(); ?> Output: Reference: http://php.net/manual/en/imagickdraw.roundrectangle.php Comment More infoAdvertise with us Next Article PHP | ImagickDraw roundRectangle() Function sarthak_ishu11 Follow Improve Article Tags : Technical Scripter Web Technologies PHP Image-Processing PHP-function PHP-Imagick +2 More Similar Reads PHP | GmagickDraw roundrectangle() Function The GmagickDraw::roundrectangle() function is an inbuilt function in PHP which is used to draw a rounded rectangle. Syntax: public GmagickDraw::rectangle( $x1, $y1, $x2, $y2, $rx, $ry) Â Parameters:This function accepts four parameters as mentioned above and described below: $x1: This parameter take 2 min read PHP | ImagickDraw rectangle() Function The ImagickDraw::rectangle() function is an inbuilt function in Imagick library of PHP which is used to draw a rectangle. Syntax: bool ImagickDraw::rectangle( $x1, $y1, $x2, $y2 ) Parameters: This function accepts four parameters as mentioned above and described below: $x1: This parameter takes the 1 min read PHP | ImagickDraw rotate() Function The ImagickDraw::rotate() function is an inbuilt function of PHP which is used to apply the specified rotation to the current coordinate space. bool ImagickDraw::rotate( $degrees ) Parameters: This function accepts a single parameter $degrees which is used to hold the value of degree of rotation. Re 2 min read PHP | ImagickDraw scale() Function The ImagickDraw::scale() function is an inbuilt function in PHP which is used to adjust the scaling factor to apply in the horizontal and vertical directions to the current coordinate space. Syntax:Â bool ImagickDraw::scale( $x, $y ) Parameters: This function accepts two parameter as mentioned above 2 min read PHP | ImagickDraw translate() Function The ImagickDraw::translate() function is an inbuilt function in PHP which is used to apply a translation to the current coordinate system. It applies a translation to the current coordinate system which moves the coordinate system origin to the specified coordinate. Syntax: bool ImagickDraw::transla 3 min read PHP | Imagick roundCorners() Function The Imagick::roundCorners() function is an inbuilt function in PHP which is used to round the image corners. Syntax: bool Imagick::roundCorners( float $x_rounding, float $y_rounding, float $stroke_width = 10, float $displace = 5, float $size_correction = -6 ) Parameters: This function accepts five p 2 min read PHP | ImagickDraw point() Function The ImagickDraw::point() function is an inbuilt function in Imagick library of PHP which is used to draw a point. This function uses current stroke color and stroke thickness at the specified coordinates. Syntax: bool ImagickDraw::point( $x, $y ) Parameters: This function accepts two parameters as m 1 min read PHP | ImagickDraw setFontStyle() Function The ImagickDraw::setFontStyle() function is an inbuilt function in PHP which is used to set the font style to use when annotating with text. The AnyStyle enumeration acts as a wild-card "don't care" option. Syntax: bool ImagickDraw::setFontStyle( $style ) Parameters: This function accepts a single p 2 min read PHP | ImagickDraw popDefs() Function The ImagickDraw::popDefs() function is an inbuilt function in PHP which is used to terminate a definition list. These are usually used to define draw commands which should be safely processed earlier for the sake of efficiency. This command has no impact on the looks of the draw commands. Syntax: bo 2 min read PHP | ImagickDraw setFont() Function The ImagickDraw::setFont() function is an inbuilt function in PHP which is used to set the fully-specified font to use when annotating with text. Syntax: bool ImagickDraw::setFont( $font_name ) Parameters: This function accepts a single parameter $font_name which is used to hold the value of font na 2 min read Like