PHP | ImagickDraw getClipPath() Function
Last Updated :
23 Dec, 2019
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 path ID or false if no clip path exists.
Exceptions: This function throws ImagickException on error.
Below given programs illustrate the ImagickDraw::getClipPath() function in PHP:
Program 1:
<?php
$draw = new ImagickDraw();
echo $draw ->getClipPath();
?>
|
Output:
//This will return empty string because default value is empty.
Program 2:
<?php
$draw = new ImagickDraw();
$draw ->setClipPath( 'sample_name' );
echo $draw ->getClipPath();
?>
|
Output:
sample_name
Reference: https://www.php.net/manual/en/imagickdraw.getclippath.php
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...