PHP | GmagickDraw getfillopacity() Function Last Updated : 21 Jan, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 any parameters. Return Value: This function returns a float value containing the opacity. Exceptions: This function throws GmagickDrawException on error. Below given programs illustrate the GmagickDraw::getfillopacity() function in PHP: Used Image: Program 1: php <?php // Create a new GmagickDraw object $draw = new GmagickDraw(); // Get the Fill Opacity $fillOpacity = $draw->getfillopacity(); echo $fillOpacity; ?> Output: 0 // Which is the default value Program 2: php <?php // Create a new Gmagick object $gmagick = new Gmagick('geeksforgeeks.png'); // Create a GmagickDraw object $draw = new GmagickDraw(); // Set the color $draw->setFillColor('#0E0E0E'); // Draw rectangle for background $draw->rectangle(-10, -10, 800, 400); // Set the fill color $draw->setFillColor('yellow'); // Set the font size $draw->setFontSize(20); // Set the fill opacity $draw->setfillopacity(1); // Annotate a text $draw->annotate(50, 30, 'The fill opacity here is ' . $draw->getfillopacity()); // Set the fill opacity $draw->setfillopacity(0.5); // Annotate a text $draw->annotate(50, 100, 'The fill opacity here is ' . $draw->getfillopacity()); // Draw the image $gmagick->drawImage($draw); // Display the output image header("Content-Type: image/png"); echo $gmagick->getImageBlob(); ?> Output: Reference: https://www.php.net/manual/en/gmagickdraw.getfillopacity.php Comment More infoAdvertise with us Next Article PHP | GmagickDraw getfont() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Gmagick Similar Reads PHP | ImagickDraw getFillOpacity() Function 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 a 2 min read PHP | GmagickDraw getstrokeopacity() Function The Gmagick::getstrokeopacity() function is an inbuilt function in PHP which is used to return the opacity of stroked object outlines. Syntax: public GmagickDraw::getstrokeopacity( void ) Â Parameters: This function does not accept any parameter. Return Value: This function returns the double descri 2 min read PHP | GmagickDraw getfillcolor() function The GmagickDraw::getfillcolor() function is an inbuilt function in PHP which is used to get the fill color used for drawing filled objects. Syntax: GmagickPixel GmagickDraw::getfillcolor( void ) Parameters:This function doesnât accept any parameter. Return Value: This function returns GmagickPixel f 2 min read PHP | GmagickDraw getfont() Function The GmagickDraw::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 GmagickDraw::getfont( void ) Parameters: This function doesnât accept any parameters. Return Value: This function returns an string val 2 min read PHP | GmagickDraw getfontstyle() Function The GmagickDraw::getfontstyle() function is an inbuilt function in PHP which is used to get the font style used when annotating with text. Syntax: int GmagickDraw::getfontstyle( void ) Parameters: This function doesnât accept any parameters. Return Value: This function returns an integer value corre 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 Like