mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
forgot to move imeageellipse out of #ifdef HAVE_LIBGD20
This commit is contained in:
parent
3e7c884b1c
commit
0b6074a343
58
ext/gd/gd.c
58
ext/gd/gd.c
@ -659,35 +659,6 @@ PHP_FUNCTION(imagesetthickness)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void imageellipse(resource im, int cx, int cy, int w, int h, int color)
|
||||
Draw an ellipse */
|
||||
PHP_FUNCTION(imageellipse)
|
||||
{
|
||||
zval **IM, **cx, **cy, **w, **h, **color;
|
||||
gdImagePtr im;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 6 || zend_get_parameters_ex(6, &IM, &cx, &cy, &w, &h, &color) == FAILURE) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd);
|
||||
|
||||
convert_to_long_ex(cx);
|
||||
convert_to_long_ex(cy);
|
||||
convert_to_long_ex(w);
|
||||
convert_to_long_ex(h);
|
||||
convert_to_long_ex(color);
|
||||
|
||||
#ifdef HAVE_GD_IMAGEELLIPSE /* this function is missing from GD 2.0.1 */
|
||||
gdImageEllipse(im, Z_LVAL_PP(cx), Z_LVAL_PP(cy), Z_LVAL_PP(w), Z_LVAL_PP(h), Z_LVAL_PP(color));
|
||||
#else
|
||||
gdImageArc(im, Z_LVAL_PP(cx), Z_LVAL_PP(cy), Z_LVAL_PP(w), Z_LVAL_PP(h), 0, 360, Z_LVAL_PP(color));
|
||||
#endif
|
||||
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void imagefilledellipse(resource im, int cx, int cy, int w, int h, int color)
|
||||
Draw an ellipse */
|
||||
PHP_FUNCTION(imagefilledellipse)
|
||||
@ -1976,6 +1947,35 @@ PHP_FUNCTION(imagearc)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto void imageellipse(resource im, int cx, int cy, int w, int h, int color)
|
||||
Draw an ellipse */
|
||||
PHP_FUNCTION(imageellipse)
|
||||
{
|
||||
zval **IM, **cx, **cy, **w, **h, **color;
|
||||
gdImagePtr im;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 6 || zend_get_parameters_ex(6, &IM, &cx, &cy, &w, &h, &color) == FAILURE) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd);
|
||||
|
||||
convert_to_long_ex(cx);
|
||||
convert_to_long_ex(cy);
|
||||
convert_to_long_ex(w);
|
||||
convert_to_long_ex(h);
|
||||
convert_to_long_ex(color);
|
||||
|
||||
#ifdef HAVE_GD_IMAGEELLIPSE /* this function is missing from GD 2.0.1 */
|
||||
gdImageEllipse(im, Z_LVAL_PP(cx), Z_LVAL_PP(cy), Z_LVAL_PP(w), Z_LVAL_PP(h), Z_LVAL_PP(color));
|
||||
#else
|
||||
gdImageArc(im, Z_LVAL_PP(cx), Z_LVAL_PP(cy), Z_LVAL_PP(w), Z_LVAL_PP(h), 0, 360, Z_LVAL_PP(color));
|
||||
#endif
|
||||
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int imagefilltoborder(int im, int x, int y, int border, int col)
|
||||
Flood fill to specific color */
|
||||
PHP_FUNCTION(imagefilltoborder)
|
||||
|
Loading…
Reference in New Issue
Block a user