Skip to content
Related Articles
Open in App
Not now

Related Articles

PHP | ImagickDraw getStrokeOpacity() Function

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

The ImagickDraw::getStrokeOpacity() function is an inbuilt function in PHP which is used to return the opacity of stroked object outlines.


float ImagickDraw::getStrokeOpacity( void )

Parameters: This function does not accepts any parameters.

Return Value: This function returns stroke opacity on success.

Errors/Exceptions: It throws an ImagickException on error.

Below program illustrates the ImagickDraw::getStrokeOpacity() function in PHP:


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




My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!