Пример #1
0
/* {{{ proto bool ImagickPixel::setHSL(float hue, float saturation, float luminosity)
	Sets the normalized HSL color of the pixel wand.
*/
PHP_METHOD(imagickpixel, sethsl)
{
    php_imagickpixel_object *internp;
    double hue, saturation, luminosity;

    /* Parse parameters given to function */
    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd", &hue, &saturation, &luminosity) == FAILURE) {
        return;
    }

    internp = Z_IMAGICKPIXEL_P(getThis());

    PixelSetHSL(internp->pixel_wand, hue, saturation, luminosity);
    RETURN_TRUE;
}
Пример #2
0
static bool HHVM_METHOD(ImagickPixel, setHSL,
    double hue, double saturation, double luminosity) {
  auto wand = getPixelWandResource(this_);
  PixelSetHSL(wand->getWand(), hue, saturation, luminosity);
  return true;
}