The ImagickDraw::getStrokeOpacity() function is an inbuilt function in PHP which is used to return the opacity of stroked object outlines.
Syntax:
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:
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 width $draw->setStrokeWidth(7); // Draw the rectangle $draw->rectangle(40, 30, 200, 260); // Set the stroke opacity $draw->setStrokeOpacity(0.5); // Display the StrokeOpacity echo $draw->getStrokeOpacity(); ?> |
Output:
0.49999237048905
Reference: http://php.net/manual/en/imagickdraw.getstrokeopacity.php
Recommended Posts:
- PHP | GmagickDraw getstrokeopacity() Function
- PHP | ImagickDraw pop() Function
- PHP | ImagickDraw arc() Function
- PHP | ImagickDraw ellipse() Function
- PHP | ImagickDraw composite() Function
- PHP | ImagickDraw destroy() Function
- PHP | ImagickDraw __construct() Function
- PHP | ImagickDraw getFontFamily() Function
- PHP | ImagickDraw setClipRule() Function
- PHP | ImagickDraw getFontSize() Function
- PHP | ImagickDraw setFillAlpha() Function
- PHP | ImagickDraw resetVectorGraphics() Function
- PHP | ImagickDraw popPattern() Function
- PHP | ImagickDraw pushPattern() Function
- PHP | ImagickDraw clear() Function
- PHP | ImagickDraw pathStart() Function
- PHP | ImagickDraw setClipPath() Function
- PHP | ImagickDraw getClipPath() Function
- PHP | ImagickDraw color() Function
- PHP | ImagickDraw setStrokePatternURL() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

