Skip to content
Related Articles
Open in App
Not now

Related Articles

PHP | ImagickDraw getStrokeWidth() Function

Improve Article
Save Article
Like Article
  • Last Updated : 11 Jul, 2019
Improve Article
Save Article
Like Article

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.


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:


// Create an ImagickDraw object
$draw = new \ImagickDraw();
// Set the Stroke Color 
// Set the Fill Color
// Set the stroke opacity
// Draw the rectangle
$draw->rectangle(40, 30, 200, 260);
// Set the stroke width
// Display the StrokeWidth 
echo $draw->getStrokeWidth();




My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!