PHP | ImagickDraw getStrokeWidth() Function
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.
Syntax:
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:
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 opacity $draw->setStrokeOpacity(0.5); // Draw the rectangle $draw->rectangle(40, 30, 200, 260); // Set the stroke width $draw->setStrokeWidth(7); // Display the StrokeWidth echo $draw->getStrokeWidth(); ?> |
Output:
7
Reference: http://php.net/manual/en/imagickdraw.getstrokewidth.php
Recommended Posts:
- PHP | GmagickDraw getstrokewidth() Function
- PHP | ImagickDraw arc() Function
- PHP | ImagickDraw translate() Function
- PHP | ImagickDraw setStrokeOpacity() Function
- PHP | ImagickDraw getStrokeOpacity() Function
- PHP | ImagickDraw skewX() Function
- PHP | ImagickDraw setStrokeWidth() Function
- PHP | ImagickDraw setStrokeAlpha() Function
- PHP | ImagickDraw setFontWeight() Function
- PHP | ImagickDraw setStrokeMiterLimit() Function
- PHP | ImagickDraw setTextAlignment() Function
- PHP | ImagickDraw setStrokeColor() Function
- PHP | ImagickDraw setFillOpacity() Function
- PHP | ImagickDraw setFont() Function
- PHP | ImagickDraw setFillColor() 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.



