PHP | ImagickDraw getFillOpacity() Function Last Updated : 23 Dec, 2019 Comments Improve Suggest changes Like Article Like Report The ImagickDraw::getFillOpacity() function is an inbuilt function in PHP which is used to get the opacity used when drawing using the fill color or fill texture. Fully opaque is 1 and fully transparent is 0. Syntax: float ImagickDraw::getFillOpacity( void ) Parameters: This function doesn’t accept any parameter. Return Value: This function returns an float value containing the opacity. Exceptions: This function throws ImagickException on error. Below given programs illustrate the ImagickDraw::getFillOpacity() function in PHP: Program 1: php <?php // Create a new ImagickDraw object $draw = new ImagickDraw(); // Get the Fill Opacity $fillOpacity = $draw->getFillOpacity(); echo $fillOpacity; ?> Output: 1 // which is the default value. Program 2: php <?php // Create a new ImagickDraw object $draw = new ImagickDraw(); // Set the Fill Opacity $draw->setFillOpacity(0.6); // Get the Fill Opacity $fillOpacity = $draw->getFillOpacity(); echo $fillOpacity; ?> Output: 0.6 Program 3: php <?php // Create a new imagick object $imagick = new Imagick(); // Create a image on imagick object $imagick->newImage(800, 250, 'black'); // Create a new ImagickDraw object $draw = new ImagickDraw(); // Set the fill color $draw->setFillColor('yellow'); // Set the font size $draw->setFontSize(20); // Annotate a text $draw->annotation(50, 100, 'The fill opacity here is ' . $draw->getFillOpacity()); // Set the fill opacity $draw->setFillOpacity(0.4); // Annotate a text $draw->annotation(50, 200, 'The fill opacity here is ' . $draw->getFillOpacity()); // Render the draw commands $imagick->drawImage($draw); // Show the output $imagick->setImageFormat('png'); header("Content-Type: image/png"); echo $imagick->getImageBlob(); ?> Output: Reference: https://www.php.net/manual/en/imagickdraw.getfillopacity.php Comment More infoAdvertise with us Next Article PHP | ImagickDraw getFillOpacity() Function gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | GmagickDraw getfillopacity() Function The GmagickDraw::getfillopacity() function is an inbuilt function in PHP which is used to get the opacity used when drawing using the fill color or fill texture. Fully opaque is 1 and fully transparent is 0. Syntax: float GmagickDraw::getfillopacity( void ) Parameters: This function doesnât accept a 2 min read PHP | ImagickDraw getStrokeOpacity() Function 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 1 min read PHP | ImagickDraw getFillColor() Function The ImagickDraw::getFillColor() function is an inbuilt function in PHP which is used to get the fill color used for drawing filled objects. Syntax: ImagickPixel ImagickDraw::getFillColor( void ) Parameters: This function doesnât accept any parameter. Return Value: This function returns an ImagickPix 2 min read PHP | ImagickDraw getFont() Function The ImagickDraw::getFont() function is an inbuilt function in PHP which is used to get the string specifying the font used when annotating with text. Syntax: string ImagickDraw::getFont( void ) Parameters: This function doesnât accepts any parameters. Return Value: This function returns an string va 2 min read PHP | ImagickDraw getGravity() Function The ImagickDraw::getGravity() function is an inbuilt function in PHP which is used to get the text placement gravity used when annotating with text. Syntax: int ImagickDraw::getGravity( void ) Parameters: This function doesnât accepts any parameters. Return Value: This function returns an integer va 2 min read PHP | ImagickDraw getFontFamily() Function The ImagickDraw::getFontFamily() function is an inbuilt function in PHP which is used to get the font family to use when annotating with text. It tells the specific size and style of text to be used and there are many font-families available like Times, AvantGarde, NewCenturySchlbk, Palatino, etc. S 2 min read PHP | ImagickDraw getFillRule() Function The ImagickDraw::getFillRule() function is an inbuilt function in PHP which is used to get the fill rule used while drawing the polygons. Syntax: int ImagickDraw::getFillRule( void ) Parameters: This function doesnât accepts any parameters. Return Value: This function returns an integer value corres 1 min read PHP | ImagickDraw getClipPath() Function The ImagickDraw::getClipPath() function is an inbuilt function in PHP which is used to get the current clipping path ID. Syntax: string ImagickDraw::getClipPath( void ) Parameters: This function doesnât accept any parameter. Return Value: This function returns an string value containing the clip pat 1 min read PHP | ImagickDraw getClipUnits() Function The ImagickDraw::getClipUnits() function is an inbuilt function in PHP which is used to get the interpretation of clip path units. Syntax: int ImagickDraw::getClipUnits( void ) Parameters: This function doesnât accept any parameter. Return Value: This function returns an integer value corresponding 1 min read PHP | ImagickDraw getFontStyle() Function The ImagickDraw::getFontStyle() function is an inbuilt function in PHP which is used to get the font style used when annotating with text. Syntax: int ImagickDraw::getFontStyle( void ) Parameters: This function doesnât accepts any parameters. Return Value: This function returns an integer value corr 2 min read Like