PHP | ImagickDraw getStrokeOpacity() FunctionReadDiscussCoursesPracticeImprove Article ImproveSave Article SaveLike Article LikeThe 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.49999237048905Reference: http://php.net/manual/en/imagickdraw.getstrokeopacity.phpLast Updated : 11 Jul, 2019Like Article Save Article Please Login to comment...Similar ReadsPHP | GmagickDraw getstrokeopacity() FunctionPHP | ImagickDraw getTextAlignment() FunctionPHP | ImagickDraw scale() FunctionPHP | ImagickDraw polygon() FunctionPHP | ImagickDraw roundRectangle() FunctionPHP | ImagickDraw arc() FunctionPHP | ImagickDraw circle() FunctionPHP | ImagickDraw bezier() FunctionPHP | ImagickDraw rectangle() FunctionPHP | ImagickDraw line() FunctionRelated TutorialsOnsen UIReact Material UINuxtJSD3.jsSpectre CSS LikePreviousPHP | ImagickDraw circle() FunctionNext PHP | ImagickDraw getStrokeWidth() FunctionArticle Contributed By :sarthak_ishu11sarthak_ishu11 FollowVote for difficultyEasy Normal Medium Hard ExpertArticle Tags :PHP-ImagickPHPWeb TechnologiesPractice Tags :PHPReport Issue