cvs: pecl /ps php_ps.h ps.c
| From: | Uwe Steinmann | Date: | Thu, 04 Mar 2004 07:26:22 +0000 |
| Subject: | cvs: pecl /ps php_ps.h ps.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-1003@lists.php.net to get a copy of this message | ||
steinm Thu Mar 4 02:26:22 2004 EDT
Modified files:
/pecl/ps ps.c php_ps.h
Log:
- Many code cleanups, old functions has been removed
- new font and image handling
- fixed several memory leaks
http://cvs.php.net/diff.php/pecl/ps/ps.c?r1=1.8&r2=1.9&ty=u Index: pecl/ps/ps.c diff -u pecl/ps/ps.c:1.8 pecl/ps/ps.c:1.9 --- pecl/ps/ps.c:1.8 Wed Mar 3 13:42:59 2004 +++ pecl/ps/ps.c Thu Mar 4 02:26:22 2004 @@ -12,7 +12,7 @@ | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ - | Authors: Uwe Steinmann <Uwe.Steinmann@fernuni-hagen.de> | + | Authors: Uwe Steinmann <steinm@debian.org> | +----------------------------------------------------------------------+ */ @@ -56,18 +56,6 @@ static int le_psdoc; -/* - * to adopt the php way of error handling to PSlib - * The image related functions in PSlib return -1 on error - * but they may return 0 (FALSE) in normal cases - * so this offset will repair this - */ -#define PSLIB_IMAGE_OFFSET 1 -#define PSLIB_FONT_OFFSET 1 -#define PSLIB_PDI_OFFSET 1 -#define PSLIB_PATTERN_OFFSET 1 -#define PSLIB_SPOT_OFFSET 1 - /* {{{ ps_functions[] */ function_entry ps_functions[] = { @@ -140,14 +128,6 @@ /* End of the official PSLIB V3.x API */ - /* old font handling */ -// PHP_FE(ps_get_font, NULL) /* deprecated, see below */ - - PHP_FE(ps_get_image_height, NULL) /* deprecated */ - PHP_FE(ps_get_image_width, NULL) /* deprecated */ - - /* some more stuff for compatibility */ -// PHP_FE(ps_add_annotation, NULL) #ifdef _HAVE_LIBGD13 PHP_FE(ps_open_memory_image, NULL) #endif @@ -275,7 +255,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "PS Support", "enabled" ); php_info_print_table_row(2, "PSlib Version", tmp ); - php_info_print_table_row(2, "Revision", "$Revision: 1.8 $" ); + php_info_print_table_row(2, "Revision", "$Revision: 1.9 $" ); php_info_print_table_end(); } @@ -398,7 +378,7 @@ WRONG_PARAM_COUNT; } - ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps object", le_psdoc); + ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps document", le_psdoc); convert_to_string_ex(arg2); convert_to_string_ex(arg3); @@ -421,7 +401,7 @@ WRONG_PARAM_COUNT; } - ZEND_FETCH_RESOURCE(ps, PSDoc *, argv[0], -1, "ps object", le_psdoc); + ZEND_FETCH_RESOURCE(ps, PSDoc *, argv[0], -1, "ps document", le_psdoc); convert_to_string_ex(argv[1]); if(argc == 3) { @@ -446,7 +426,7 @@ WRONG_PARAM_COUNT; } - ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps object", le_psdoc); + ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps document", le_psdoc); convert_to_string_ex(arg2); convert_to_double_ex(arg3); @@ -469,44 +449,16 @@ WRONG_PARAM_COUNT; } - ZEND_FETCH_RESOURCE(ps, PSDoc *, argv[0], -1, "ps object", le_psdoc); + ZEND_FETCH_RESOURCE(ps, PSDoc *, argv[0], -1, "ps document", le_psdoc); convert_to_string_ex(argv[1]); - if(argc == 3) - convert_to_double_ex(argv[2]); -/* - if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "imagewidth"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "imageheight"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "resx"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "resy"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "capheight"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "ascender"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "descender"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "font"))) { - // See PS_get_font() for more info + if(argc < 3) { value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), 0.0); - } else { */ - if(argc < 3) { - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), 0.0); - } else { - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } -/* } */ + } else { + convert_to_double_ex(argv[2]); + value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); + } RETURN_DOUBLE(value); } @@ -740,7 +692,7 @@ WRONG_PARAM_COUNT; } - ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps object", le_psdoc); + ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps document", le_psdoc); convert_to_double_ex(arg2); convert_to_double_ex(arg3); @@ -1126,26 +1078,6 @@ /* }}} */ #ifdef notimplementedyet -/* {{{ proto int ps_get_font(int psdoc) - Gets the current font. -*/ -PHP_FUNCTION(ps_get_font) -{ - zval **arg1; - PSDoc *ps; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) { - WRONG_PARAM_COUNT; - } - - ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps document", le_psdoc); - - RETURN_LONG(PS_getfont(ps)); -} -/* }}} */ -#endif - -#ifdef notimplementedyet /* {{{ proto void ps_set_text_pos(int psdoc, double x, double y) Sets the position of text for the next ps_show call */ PHP_FUNCTION(ps_set_text_pos) @@ -1708,48 +1640,6 @@ } /* }}} */ -#ifdef notimplementedyet -/* {{{ proto int ps_get_image_width(int ps, int psimage) - Returns the width of an image */ -PHP_FUNCTION(ps_get_image_width) -{ - zval **arg1, **arg2; - PSDoc *ps; - int width; - - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) { - WRONG_PARAM_COUNT; - } - - ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps document", le_psdoc); - convert_to_long_ex(arg2); - - width = (int) PS_get_value(ps, "imagewidth", (float)Z_LVAL_PP(arg2)); - RETURN_LONG(width); -} -/* }}} */ - -/* {{{ proto int ps_get_image_height(int ps, int psimage) - Returns the height of an image */ -PHP_FUNCTION(ps_get_image_height) -{ - zval **arg1, **arg2; - PSDoc *ps; - int height; - - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) { - WRONG_PARAM_COUNT; - } - - ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps document", le_psdoc); - convert_to_long_ex(arg2); - - height = (int) PS_get_value(ps, "imageheight", (float)Z_LVAL_PP(arg2)); - RETURN_LONG(height); -} -/* }}} */ -#endif - /* {{{ proto void ps_add_weblink(int psdoc, double llx, double lly, double urx, double ury, string url) Adds link to web resource */ PHP_FUNCTION(ps_add_weblink) @@ -1907,7 +1797,8 @@ PHP_FUNCTION(ps_new) { PSDoc *ps; - ps = PS_new2(custom_errorhandler, ps_emalloc, ps_erealloc, ps_efree, NULL); + if(NULL == (ps = PS_new2(custom_errorhandler, ps_emalloc, ps_erealloc, ps_efree, NULL))) + RETURN_FALSE; PS_set_parameter(ps, "imagewarning", "true"); PS_set_parameter(ps, "binding", "PHP"); @@ -2311,9 +2202,9 @@ convert_to_double_ex(arg7); if (0 == (strcmp(Z_STRVAL_PP(arg3), "spot"))) { - c1 = Z_DVAL_PP(arg4)-PSLIB_SPOT_OFFSET; + c1 = Z_DVAL_PP(arg4); } else if(0 == (strcmp(Z_STRVAL_PP(arg3), "pattern"))) { - c1 = Z_DVAL_PP(arg4)-PSLIB_PATTERN_OFFSET; + c1 = Z_DVAL_PP(arg4); } else { c1 = Z_DVAL_PP(arg4); } http://cvs.php.net/diff.php/pecl/ps/php_ps.h?r1=1.4&r2=1.5&ty=u Index: pecl/ps/php_ps.h diff -u pecl/ps/php_ps.h:1.4 pecl/ps/php_ps.h:1.5 --- pecl/ps/php_ps.h:1.4 Wed Mar 3 13:27:32 2004 +++ pecl/ps/php_ps.h Thu Mar 4 02:26:22 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ps.h,v 1.4 2004/03/03 18:27:32 steinm Exp $ */ +/* $Id: php_ps.h,v 1.5 2004/03/04 07:26:22 steinm Exp $ */ #ifndef PHP_PS_H #define PHP_PS_H @@ -111,43 +111,10 @@ PHP_FUNCTION(ps_set_border_dash); PHP_FUNCTION(ps_setcolor); -/* RJS: - End of the official PSLIB V3.x API */ - -/* old font handling */ -PHP_FUNCTION(ps_set_font); /* deprecated */ -PHP_FUNCTION(ps_get_font); /* deprecated */ -PHP_FUNCTION(ps_get_fontname); /* deprecated */ -PHP_FUNCTION(ps_get_fontsize); /* deprecated */ - /* old way of starting a PS document */ PHP_FUNCTION(ps_open); /* deprecated */ -/* old stuff for setting infos */ -PHP_FUNCTION(ps_set_info_creator); /* deprecated */ -PHP_FUNCTION(ps_set_info_title); /* deprecated */ -PHP_FUNCTION(ps_set_info_subject); /* deprecated */ -PHP_FUNCTION(ps_set_info_author); /* deprecated */ -PHP_FUNCTION(ps_set_info_keywords); /* deprecated */ -PHP_FUNCTION(ps_set_leading); /* deprecated */ -PHP_FUNCTION(ps_set_text_rendering); /* deprecated */ -PHP_FUNCTION(ps_set_horiz_scaling); /* deprecated */ -PHP_FUNCTION(ps_set_text_rise); /* deprecated */ -PHP_FUNCTION(ps_set_char_spacing); /* deprecated */ -PHP_FUNCTION(ps_set_word_spacing); /* deprecated */ -PHP_FUNCTION(ps_set_transition); /* deprecated */ -PHP_FUNCTION(ps_set_duration); /* deprecated */ -PHP_FUNCTION(ps_get_image_height); /* deprecated */ -PHP_FUNCTION(ps_get_image_width); /* deprecated */ - -/* old stuff for opening images */ -PHP_FUNCTION(ps_open_jpeg); /* deprecated */ -PHP_FUNCTION(ps_open_tiff); /* deprecated */ -PHP_FUNCTION(ps_open_png); /* deprecated */ -PHP_FUNCTION(ps_open_gif); /* deprecated */ - /* some more stuff for compatibility */ -PHP_FUNCTION(ps_add_annotation); #if HAVE_LIBGD13 PHP_FUNCTION(ps_open_memory_image); #endif
http://cvs.php.net/diff.php/pecl/ps/ps.c?r1=1.8&r2=1.9&ty=u Index: pecl/ps/ps.c diff -u pecl/ps/ps.c:1.8 pecl/ps/ps.c:1.9 --- pecl/ps/ps.c:1.8 Wed Mar 3 13:42:59 2004 +++ pecl/ps/ps.c Thu Mar 4 02:26:22 2004 @@ -12,7 +12,7 @@ | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ - | Authors: Uwe Steinmann <Uwe.Steinmann@fernuni-hagen.de> | + | Authors: Uwe Steinmann <steinm@debian.org> | +----------------------------------------------------------------------+ */ @@ -56,18 +56,6 @@ static int le_psdoc; -/* - * to adopt the php way of error handling to PSlib - * The image related functions in PSlib return -1 on error - * but they may return 0 (FALSE) in normal cases - * so this offset will repair this - */ -#define PSLIB_IMAGE_OFFSET 1 -#define PSLIB_FONT_OFFSET 1 -#define PSLIB_PDI_OFFSET 1 -#define PSLIB_PATTERN_OFFSET 1 -#define PSLIB_SPOT_OFFSET 1 - /* {{{ ps_functions[] */ function_entry ps_functions[] = { @@ -140,14 +128,6 @@ /* End of the official PSLIB V3.x API */ - /* old font handling */ -// PHP_FE(ps_get_font, NULL) /* deprecated, see below */ - - PHP_FE(ps_get_image_height, NULL) /* deprecated */ - PHP_FE(ps_get_image_width, NULL) /* deprecated */ - - /* some more stuff for compatibility */ -// PHP_FE(ps_add_annotation, NULL) #ifdef _HAVE_LIBGD13 PHP_FE(ps_open_memory_image, NULL) #endif @@ -275,7 +255,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "PS Support", "enabled" ); php_info_print_table_row(2, "PSlib Version", tmp ); - php_info_print_table_row(2, "Revision", "$Revision: 1.8 $" ); + php_info_print_table_row(2, "Revision", "$Revision: 1.9 $" ); php_info_print_table_end(); } @@ -398,7 +378,7 @@ WRONG_PARAM_COUNT; } - ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps object", le_psdoc); + ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps document", le_psdoc); convert_to_string_ex(arg2); convert_to_string_ex(arg3); @@ -421,7 +401,7 @@ WRONG_PARAM_COUNT; } - ZEND_FETCH_RESOURCE(ps, PSDoc *, argv[0], -1, "ps object", le_psdoc); + ZEND_FETCH_RESOURCE(ps, PSDoc *, argv[0], -1, "ps document", le_psdoc); convert_to_string_ex(argv[1]); if(argc == 3) { @@ -446,7 +426,7 @@ WRONG_PARAM_COUNT; } - ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps object", le_psdoc); + ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps document", le_psdoc); convert_to_string_ex(arg2); convert_to_double_ex(arg3); @@ -469,44 +449,16 @@ WRONG_PARAM_COUNT; } - ZEND_FETCH_RESOURCE(ps, PSDoc *, argv[0], -1, "ps object", le_psdoc); + ZEND_FETCH_RESOURCE(ps, PSDoc *, argv[0], -1, "ps document", le_psdoc); convert_to_string_ex(argv[1]); - if(argc == 3) - convert_to_double_ex(argv[2]); -/* - if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "imagewidth"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "imageheight"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "resx"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "resy"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "capheight"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "ascender"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "descender"))) { - if(argc < 3) WRONG_PARAM_COUNT; - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "font"))) { - // See PS_get_font() for more info + if(argc < 3) { value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), 0.0); - } else { */ - if(argc < 3) { - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), 0.0); - } else { - value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); - } -/* } */ + } else { + convert_to_double_ex(argv[2]); + value = PS_get_value(ps, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])); + } RETURN_DOUBLE(value); } @@ -740,7 +692,7 @@ WRONG_PARAM_COUNT; } - ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps object", le_psdoc); + ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps document", le_psdoc); convert_to_double_ex(arg2); convert_to_double_ex(arg3); @@ -1126,26 +1078,6 @@ /* }}} */ #ifdef notimplementedyet -/* {{{ proto int ps_get_font(int psdoc) - Gets the current font. -*/ -PHP_FUNCTION(ps_get_font) -{ - zval **arg1; - PSDoc *ps; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) { - WRONG_PARAM_COUNT; - } - - ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps document", le_psdoc); - - RETURN_LONG(PS_getfont(ps)); -} -/* }}} */ -#endif - -#ifdef notimplementedyet /* {{{ proto void ps_set_text_pos(int psdoc, double x, double y) Sets the position of text for the next ps_show call */ PHP_FUNCTION(ps_set_text_pos) @@ -1708,48 +1640,6 @@ } /* }}} */ -#ifdef notimplementedyet -/* {{{ proto int ps_get_image_width(int ps, int psimage) - Returns the width of an image */ -PHP_FUNCTION(ps_get_image_width) -{ - zval **arg1, **arg2; - PSDoc *ps; - int width; - - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) { - WRONG_PARAM_COUNT; - } - - ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps document", le_psdoc); - convert_to_long_ex(arg2); - - width = (int) PS_get_value(ps, "imagewidth", (float)Z_LVAL_PP(arg2)); - RETURN_LONG(width); -} -/* }}} */ - -/* {{{ proto int ps_get_image_height(int ps, int psimage) - Returns the height of an image */ -PHP_FUNCTION(ps_get_image_height) -{ - zval **arg1, **arg2; - PSDoc *ps; - int height; - - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) { - WRONG_PARAM_COUNT; - } - - ZEND_FETCH_RESOURCE(ps, PSDoc *, arg1, -1, "ps document", le_psdoc); - convert_to_long_ex(arg2); - - height = (int) PS_get_value(ps, "imageheight", (float)Z_LVAL_PP(arg2)); - RETURN_LONG(height); -} -/* }}} */ -#endif - /* {{{ proto void ps_add_weblink(int psdoc, double llx, double lly, double urx, double ury, string url) Adds link to web resource */ PHP_FUNCTION(ps_add_weblink) @@ -1907,7 +1797,8 @@ PHP_FUNCTION(ps_new) { PSDoc *ps; - ps = PS_new2(custom_errorhandler, ps_emalloc, ps_erealloc, ps_efree, NULL); + if(NULL == (ps = PS_new2(custom_errorhandler, ps_emalloc, ps_erealloc, ps_efree, NULL))) + RETURN_FALSE; PS_set_parameter(ps, "imagewarning", "true"); PS_set_parameter(ps, "binding", "PHP"); @@ -2311,9 +2202,9 @@ convert_to_double_ex(arg7); if (0 == (strcmp(Z_STRVAL_PP(arg3), "spot"))) { - c1 = Z_DVAL_PP(arg4)-PSLIB_SPOT_OFFSET; + c1 = Z_DVAL_PP(arg4); } else if(0 == (strcmp(Z_STRVAL_PP(arg3), "pattern"))) { - c1 = Z_DVAL_PP(arg4)-PSLIB_PATTERN_OFFSET; + c1 = Z_DVAL_PP(arg4); } else { c1 = Z_DVAL_PP(arg4); } http://cvs.php.net/diff.php/pecl/ps/php_ps.h?r1=1.4&r2=1.5&ty=u Index: pecl/ps/php_ps.h diff -u pecl/ps/php_ps.h:1.4 pecl/ps/php_ps.h:1.5 --- pecl/ps/php_ps.h:1.4 Wed Mar 3 13:27:32 2004 +++ pecl/ps/php_ps.h Thu Mar 4 02:26:22 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ps.h,v 1.4 2004/03/03 18:27:32 steinm Exp $ */ +/* $Id: php_ps.h,v 1.5 2004/03/04 07:26:22 steinm Exp $ */ #ifndef PHP_PS_H #define PHP_PS_H @@ -111,43 +111,10 @@ PHP_FUNCTION(ps_set_border_dash); PHP_FUNCTION(ps_setcolor); -/* RJS: - End of the official PSLIB V3.x API */ - -/* old font handling */ -PHP_FUNCTION(ps_set_font); /* deprecated */ -PHP_FUNCTION(ps_get_font); /* deprecated */ -PHP_FUNCTION(ps_get_fontname); /* deprecated */ -PHP_FUNCTION(ps_get_fontsize); /* deprecated */ - /* old way of starting a PS document */ PHP_FUNCTION(ps_open); /* deprecated */ -/* old stuff for setting infos */ -PHP_FUNCTION(ps_set_info_creator); /* deprecated */ -PHP_FUNCTION(ps_set_info_title); /* deprecated */ -PHP_FUNCTION(ps_set_info_subject); /* deprecated */ -PHP_FUNCTION(ps_set_info_author); /* deprecated */ -PHP_FUNCTION(ps_set_info_keywords); /* deprecated */ -PHP_FUNCTION(ps_set_leading); /* deprecated */ -PHP_FUNCTION(ps_set_text_rendering); /* deprecated */ -PHP_FUNCTION(ps_set_horiz_scaling); /* deprecated */ -PHP_FUNCTION(ps_set_text_rise); /* deprecated */ -PHP_FUNCTION(ps_set_char_spacing); /* deprecated */ -PHP_FUNCTION(ps_set_word_spacing); /* deprecated */ -PHP_FUNCTION(ps_set_transition); /* deprecated */ -PHP_FUNCTION(ps_set_duration); /* deprecated */ -PHP_FUNCTION(ps_get_image_height); /* deprecated */ -PHP_FUNCTION(ps_get_image_width); /* deprecated */ - -/* old stuff for opening images */ -PHP_FUNCTION(ps_open_jpeg); /* deprecated */ -PHP_FUNCTION(ps_open_tiff); /* deprecated */ -PHP_FUNCTION(ps_open_png); /* deprecated */ -PHP_FUNCTION(ps_open_gif); /* deprecated */ - /* some more stuff for compatibility */ -PHP_FUNCTION(ps_add_annotation); #if HAVE_LIBGD13 PHP_FUNCTION(ps_open_memory_image); #endif