PHP | ImagickDraw getStrokeWidth() Function Improve Improve Like Article Like Save Share Report The ImagickDraw::getStrokeWidth() function is an inbuilt function of PHP which is used to return the width of the stroke used to draw object outlines. Syntax: float ImagickDraw::getStrokeWidth( void ) Parameters: This function does not accept any parameters. Return Value: This function returns stroke width on success. Errors/Exceptions: It throws an ImagickException on error. Below program illustrates the ImagickDraw::getStrokeWidth() function in PHP: Program: <?php // Create an ImagickDraw object $draw = new \ImagickDraw(); // Set the Stroke Color $draw->setStrokeColor('Green'); // Set the Fill Color $draw->setFillColor('Red'); // Set the stroke opacity $draw->setStrokeOpacity(0.5); // Draw the rectangle $draw->rectangle(40, 30, 200, 260); // Set the stroke width $draw->setStrokeWidth(7); // Display the StrokeWidth echo $draw->getStrokeWidth(); ?> Output: 7 Reference: http://php.net/manual/en/imagickdraw.getstrokewidth.php Last Updated : 11 Jul, 2019 Like Article Save Article Previous PHP | ImagickDraw destroy() Function Next PHP | Imagick frameImage() Function Share your thoughts in the comments Add Your Comment Please Login to comment... Similar Reads PHP | GmagickDraw getstrokewidth() Function PHP | ImagickDraw getTextAlignment() Function PHP | ImagickDraw scale() Function PHP | ImagickDraw polygon() Function PHP | ImagickDraw roundRectangle() Function PHP | ImagickDraw arc() Function PHP | ImagickDraw circle() Function PHP | ImagickDraw bezier() Function PHP | ImagickDraw rectangle() Function PHP | ImagickDraw line() Function Like sarthak_ishu11 Follow Article Tags : PHP-Imagick PHP Web Technologies