/* {{{ proto ImagickPixel ImagickPixel::clone(void) Clones the ImagickPixel */ PHP_METHOD(imagickpixel, clone) { php_imagickpixel_object *internp; php_imagickpixel_object *intern_return; PixelWand *pixel_wand; if (zend_parse_parameters_none() == FAILURE) { return; } IMAGICK_METHOD_DEPRECATED("ImagickPixel", "clone"); internp = Z_IMAGICKPIXEL_P(getThis()); pixel_wand = php_imagick_clone_pixelwand (internp->pixel_wand); if (!pixel_wand) { php_imagick_throw_exception (IMAGICKPIXEL_CLASS, "Failed to allocate" TSRMLS_CC); return; } object_init_ex(return_value, php_imagickpixel_sc_entry); intern_return = Z_IMAGICKPIXEL_P(return_value); php_imagick_replace_pixelwand(intern_return, pixel_wand); return; }
/* {{{ proto array ImagickPixel::clone(void) Clones the ImagickPixel */ PHP_METHOD(imagickpixel, clone) { php_imagickpixel_object *internp; php_imagickpixel_object *intern_return; PixelWand *pixel_wand; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) { return; } IMAGICK_METHOD_DEPRECATED("ImagickPixel", "clone"); internp = (php_imagickpixel_object *)zend_object_store_get_object(getThis() TSRMLS_CC); pixel_wand = php_imagick_clone_pixelwand (internp->pixel_wand); object_init_ex(return_value, php_imagickpixel_sc_entry); intern_return = (php_imagickpixel_object *)zend_object_store_get_object(return_value TSRMLS_CC); php_imagick_replace_pixelwand(intern_return, pixel_wand); return; }