Syntax:float ImagickDraw::getStrokeOpacity (void)
Parameters:this function takes no parameters.
Return Value:This function returns the opacity of the stroke on success.
Errors / Exceptions:if an error occurs, an ImagickException is thrown.The following program illustrates the ImagickDraw::getStrokeOpacity() function in PHP:
Program :
// Create ImagickDraw object
$draw
=
new
ImagickDraw();
// Set the stroke color
$draw
-> setStrokeColor (
’Green’
);
// Set fill color
$draw
-> setFillColor (
’Red’
);
// Set the stroke width
$draw
-> setStrokeWidth (7);
// Draw a rectangle-method/">rectangle
$draw
-> rectangle-method/">rectangle (40, 30, 200, 260);
// Set the opacity of the stroke
$draw
-> setStrokeOpacity (0.5);
// Display StrokeOpacity
echo
$draw
-> getStrokeOpacity();
?>
Output:0.49999237048905
Link: http://php.net /manual/en/imagickdraw.getstrokeopacity.php