HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelTutorial Source codeReport an issue


← polyline   popClipPath →
Destroys the current ImagickDraw in the stack, and returns to the previously pushed ImagickDraw. Multiple ImagickDraws may exist. It is an error to attempt to pop more ImagickDraws than have been pushed, and it is proper form to pop all ImagickDraws which have been pushed.
function popDefs($strokeColor, $fillColor, $backgroundColor)
    $draw = new \ImagickDraw();

    $draw->rectangle(50, 50, 200, 200);

    $draw->rectangle(300, 50, 450, 200);

    $imagick = new \Imagick();
    $imagick->newImage(500, 500, $backgroundColor);


    header("Content-Type: image/png");
    echo $imagick->getImageBlob();