Calling clone() on an ImagickDraw object does not return a clone of the object, but rather returns a new ImagickDraw object with all properties set to defaults. This bug has already been reported upstream, and has been fixed in CVS. See http://pecl.php.net/bugs/bug.php?id=12463 Reproducible: Always Steps to Reproduce: $hDraw = new ImagickDraw(); $hDraw->setFontSize(100); $hDraw->setFillColor(new ImagickPixel("rgba(128,128,128,0.5)")); $hClone = $hDraw->clone(); echo "Original ImagickDraw:<pre>" . print_r($hDraw->getFillColor()->getColor(), true) . "</pre>"; echo $hDraw->getFontSize() . "<br>"; echo "Cloned ImagickDraw:<pre>" . print_r($hClone->getFillColor()->getColor(), true) . "</pre>"; echo $hClone->getFontSize() . "<br>"; Actual Results: Cloned result has a fill-color of black and a font-size of 12 (the default values for a new ImagickDraw object). Expected Results: Original and Cloned ImagickDraw objects should have the same properties.
Created attachment 136425 [details, diff] Patch to fix ImagickDraw::clone() bug This patch is against pecl-imagick 2.0.1. It has already been applied in upstream CVS and will be included in pecl-imagick 2.1.0RC2.
Poke us when 2.1.0 final is out and we'll commit that, thanks.