PHP | ImagickDraw point() Function Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The ImagickDraw::point() function is an inbuilt function in Imagick library of PHP which is used to draw a point. This function uses current stroke color and stroke thickness at the specified coordinates. Syntax: bool ImagickDraw::point( $x, $y ) Parameters: This function accepts two parameters as mentioned above and described below: $x: This parameter is used to hold the value of x coordinate. $y: This parameter is used to hold the value of y coordinate. Return Value: This function returns TRUE on success. Below program illustrates the ImagickDraw::point() function in PHP: Program: php <?php // Create an ImagickDraw object $draw = new \ImagickDraw(); // Set the filled color $draw->setFillColor('red'); // Use loop to draw 10000 points in given area for ($x = 0; $x < 10000; $x++) { $draw->point(rand(0, 300), rand(0, 300)); } // Create an Imagick object $imagick = new \Imagick(); // Set the new image size $imagick->newImage(300, 300, 'white'); // Set the image format $imagick->setImageFormat("png"); // Function to draw the image $imagick->drawImage($draw); header("Content-Type: image/png"); // Display the output image echo $imagick->getImageBlob(); ?> Output: Reference: https://www.php.net/manual/en/imagickdraw.point.php Comment More infoAdvertise with us Next Article PHP | GmagickDraw point() Function S sarthak_ishu11 Follow Improve Article Tags : Misc Technical Scripter Web Technologies PHP Image-Processing PHP-function PHP-Imagick +3 More Practice Tags : Misc Similar Reads PHP | GmagickDraw point() Function The GmagickDraw::point() function is an inbuilt function in PHP which is used to draw a point. This function uses current stroke color and stroke thickness at the specified coordinates. Syntax: public GmagickDraw::point( $x, $y ) Â Parameters:This function accepts two parameters as mentioned above a 2 min read PHP | GmagickDraw point() Function The GmagickDraw::point() function is an inbuilt function in PHP which is used to draw a point. This function uses current stroke color and stroke thickness at the specified coordinates. Syntax: public GmagickDraw::point( $x, $y ) Â Parameters:This function accepts two parameters as mentioned above a 2 min read PHP | ImagickDraw pop() Function The ImagickDraw::pop() function is an inbuilt function in PHP which is used to destroy the current ImagickDraw in the stack and returns the previously pushed ImagickDraw. For every pop() function there must have already been an equivalent push() function. Syntax: bool ImagickDraw::pop( void ) Parame 2 min read PHP | ImagickDraw pop() Function The ImagickDraw::pop() function is an inbuilt function in PHP which is used to destroy the current ImagickDraw in the stack and returns the previously pushed ImagickDraw. For every pop() function there must have already been an equivalent push() function. Syntax: bool ImagickDraw::pop( void ) Parame 2 min read PHP | ImagickDraw polyline() Function The ImagickDraw::polyline() function is an inbuilt function in Imagick library of PHP which is used to draw a polyline using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates. Syntax: bool ImagickDraw::polyline( $coordinates ) Parameters: This func 2 min read PHP | ImagickDraw polyline() Function The ImagickDraw::polyline() function is an inbuilt function in Imagick library of PHP which is used to draw a polyline using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates. Syntax: bool ImagickDraw::polyline( $coordinates ) Parameters: This func 2 min read Like