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