1 --- php-4.1.2/ext/pdf/pdf.c.wiget Fri Oct 12 01:51:53 2001
2 +++ php-4.1.2/ext/pdf/pdf.c Tue Jan 29 15:12:31 2002
4 +----------------------------------------------------------------------+
10 + Id: pdf.c,v 1.105 2001/11/30 04:46:35 sniper Exp
12 + with some exeptions:
13 + - pdf_get_major/minorversion not included, as pdf_get_value supports this
14 + now without a PDF-object
15 + - #if ZEND_MODULE_API_NO >= 20010901 for new ZEND_MODULE support,
16 + so that it compiles with older PHP Versions too
17 + - TSRMLS fixes included only with ZEND_MODULE_API_NO >= 20010901
18 + would break older builds otherwise
21 /* pdflib 2.02 ... 3.0x is subject to the ALADDIN FREE PUBLIC LICENSE.
22 Copyright (C) 1997-1999 Thomas Merz. 2000-2001 PDFlib GmbH */
24 /* {{{ pdf_module_entry
26 zend_module_entry pdf_module_entry = {
27 +#if ZEND_MODULE_API_NO >= 20010901
28 STANDARD_MODULE_HEADER,
37 +#if ZEND_MODULE_API_NO >= 20010901
40 STANDARD_MODULE_PROPERTIES
47 -static void _free_pdf_doc(zend_rsrc_list_entry *rsrc TSRMLS_DC)
48 +static void _free_pdf_doc(zend_rsrc_list_entry *rsrc)
51 PDF *pdf = (PDF *)rsrc->ptr;
52 - check whether pdf-Pointer is still valid, before pdf_delete()
53 - + remove php-resource */
62 static size_t pdf_flushwrite(PDF *p, void *data, size_t size)
64 +#if ZEND_MODULE_API_NO >= 20010901
67 return(php_write(data, size TSRMLS_CC));
69 + return(php_write(data, size));
77 php_info_print_table_row(2, "PDFlib GmbH Version", tmp );
79 - php_info_print_table_row(2, "Revision", "$Revision$" );
80 + php_info_print_table_row(2, "Revision", "$Revision$" );
81 php_info_print_table_end();
86 /* {{{ proto bool pdf_set_info(int pdfdoc, string fieldname, string value)
87 Fills an info field of the document */
88 -PHP_FUNCTION(pdf_set_info)
89 +PHP_FUNCTION(pdf_set_info)
91 zval **arg1, **arg2, **arg3;
95 /* {{{ proto bool pdf_set_info_author(int pdfdoc, string author)
96 Fills the author field of the document */
97 -PHP_FUNCTION(pdf_set_info_author)
98 +PHP_FUNCTION(pdf_set_info_author)
100 _php_pdf_set_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, "Author");
104 /* {{{ proto int pdf_open([int filedesc])
105 Opens a new pdf document. If filedesc is NULL, document is created in memory. This is the old interface, only for compatibility use pdf_new + pdf_open_file instead */
106 -PHP_FUNCTION(pdf_open)
107 +PHP_FUNCTION(pdf_open)
113 /* {{{ proto void pdf_close(int pdfdoc)
114 Closes the pdf document */
115 -PHP_FUNCTION(pdf_close)
116 +PHP_FUNCTION(pdf_close)
124 -/* {{{ proto void pdf_begin_page(int pdfdoc, double width, double height)
125 +/* {{{ proto void pdf_begin_page(int pdfdoc, float width, float height)
127 -PHP_FUNCTION(pdf_begin_page)
128 +PHP_FUNCTION(pdf_begin_page)
130 zval **arg1, **arg2, **arg3;
134 /* {{{ proto void pdf_end_page(int pdfdoc)
136 -PHP_FUNCTION(pdf_end_page)
137 +PHP_FUNCTION(pdf_end_page)
143 /* {{{ proto void pdf_show(int pdfdoc, string text)
144 Output text at current position */
145 -PHP_FUNCTION(pdf_show)
146 +PHP_FUNCTION(pdf_show)
154 -/* {{{ proto void pdf_show_xy(int pdfdoc, string text, double x-koor, double y-koor)
155 +/* {{{ proto void pdf_show_xy(int pdfdoc, string text, float x_koor, float y_koor)
156 Output text at position */
157 -PHP_FUNCTION(pdf_show_xy)
158 +PHP_FUNCTION(pdf_show_xy)
160 zval **arg1, **arg2, **arg3, **arg4;
166 -/* {{{ proto int pdf_show_boxed(int pdfdoc, string text, double x-koor, double y-koor, double width, double height, string mode [, string feature])
167 +/* {{{ proto int pdf_show_boxed(int pdfdoc, string text, float x_koor, float y_koor, float width, float height, string mode [, string feature])
168 Output text formated in a boxed */
169 -PHP_FUNCTION(pdf_show_boxed)
170 +PHP_FUNCTION(pdf_show_boxed)
173 int argc = ZEND_NUM_ARGS();
178 -/* {{{ proto void pdf_set_font(int pdfdoc, string font, double size, string encoding [, int embed])
179 +/* {{{ proto void pdf_set_font(int pdfdoc, string font, float size, string encoding [, int embed])
180 Select the current font face, size and encoding */
181 -PHP_FUNCTION(pdf_set_font)
182 +PHP_FUNCTION(pdf_set_font)
184 zval **arg1, **arg2, **arg3, **arg4, **arg5;
190 -/* {{{ proto void pdf_set_value(int pdfdoc, string key, double value)
191 +/* {{{ proto void pdf_set_value(int pdfdoc, string key, float value)
192 Sets arbitrary value */
193 PHP_FUNCTION(pdf_set_value)
199 -/* {{{ proto double pdf_get_value(int pdfdoc, string key, double modifier)
200 +/* {{{ proto float pdf_get_value(int pdfdoc, string key, float modifier)
201 Gets arbitrary value */
202 PHP_FUNCTION(pdf_get_value)
205 } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "resy"))) {
206 if(argc < 3) WRONG_PARAM_COUNT;
207 value = PDF_get_value(pdf, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])-PDFLIB_IMAGE_OFFSET);
208 + } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "capheight"))) {
209 + if(argc < 3) WRONG_PARAM_COUNT;
210 + value = PDF_get_value(pdf, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])-PDFLIB_FONT_OFFSET);
211 + } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "ascender"))) {
212 + if(argc < 3) WRONG_PARAM_COUNT;
213 + value = PDF_get_value(pdf, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])-PDFLIB_FONT_OFFSET);
214 + } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "descender"))) {
215 + if(argc < 3) WRONG_PARAM_COUNT;
216 + value = PDF_get_value(pdf, Z_STRVAL_PP(argv[1]), (float)Z_DVAL_PP(argv[2])-PDFLIB_FONT_OFFSET);
217 } else if(0 == (strcmp(Z_STRVAL_PP(argv[1]), "font"))) {
218 value = PDF_get_value(pdf, Z_STRVAL_PP(argv[1]), 0.0)+PDFLIB_FONT_OFFSET;
224 -/* {{{ proto double pdf_get_fontsize(int pdfdoc)
225 +/* {{{ proto float pdf_get_fontsize(int pdfdoc)
226 Gets the current font size */
227 PHP_FUNCTION(pdf_get_fontsize)
233 -/* {{{ proto void pdf_set_leading(int pdfdoc, double distance)
234 +/* {{{ proto void pdf_set_leading(int pdfdoc, float distance)
235 Sets distance between text lines */
236 PHP_FUNCTION(pdf_set_leading)
242 -/* {{{ proto void pdf_set_horiz_scaling(int pdfdoc, double scale)
243 +/* {{{ proto void pdf_set_horiz_scaling(int pdfdoc, float scale)
244 Sets horizontal scaling of text */
245 PHP_FUNCTION(pdf_set_horiz_scaling)
251 -/* {{{ proto void pdf_set_text_rise(int pdfdoc, double value)
252 +/* {{{ proto void pdf_set_text_rise(int pdfdoc, float value)
253 Sets the text rise */
254 PHP_FUNCTION(pdf_set_text_rise)
260 -/* {{{ proto void pdf_set_char_spacing(int pdfdoc, double space)
261 +/* {{{ proto void pdf_set_char_spacing(int pdfdoc, float space)
262 Sets character spacing */
263 PHP_FUNCTION(pdf_set_char_spacing)
269 -/* {{{ proto void pdf_set_word_spacing(int pdfdoc, double space)
270 +/* {{{ proto void pdf_set_word_spacing(int pdfdoc, float space)
271 Sets spacing between words */
272 PHP_FUNCTION(pdf_set_word_spacing)
278 -/* {{{ proto void pdf_set_text_pos(int pdfdoc, double x, double y)
279 +/* {{{ proto void pdf_set_text_pos(int pdfdoc, float x, float y)
280 Sets the position of text for the next pdf_show call */
281 PHP_FUNCTION(pdf_set_text_pos)
287 -/* {{{ proto double pdf_stringwidth(int pdfdoc, string text [, int font, double size])
288 +/* {{{ proto float pdf_stringwidth(int pdfdoc, string text [, int font, float size])
289 Returns width of text in current font */
290 PHP_FUNCTION(pdf_stringwidth)
296 -/* {{{ proto void pdf_translate(int pdfdoc, double x, double y)
297 +/* {{{ proto void pdf_translate(int pdfdoc, float x, float y)
298 Sets origin of coordinate system */
299 PHP_FUNCTION(pdf_translate)
301 @@ -1010,7 +1035,7 @@
305 -/* {{{ proto void pdf_scale(int pdfdoc, double x-scale, double y-scale)
306 +/* {{{ proto void pdf_scale(int pdfdoc, float x_scale, float y_scale)
308 PHP_FUNCTION(pdf_scale)
310 @@ -1030,7 +1055,7 @@
314 -/* {{{ proto void pdf_rotate(int pdfdoc, double angle)
315 +/* {{{ proto void pdf_rotate(int pdfdoc, float angle)
317 PHP_FUNCTION(pdf_rotate)
319 @@ -1049,7 +1074,7 @@
323 -/* {{{ proto void pdf_skew(int pdfdoc, double xangle, double yangle)
324 +/* {{{ proto void pdf_skew(int pdfdoc, float xangle, float yangle)
325 Skew the coordinate system */
326 PHP_FUNCTION(pdf_skew)
328 @@ -1069,7 +1094,7 @@
332 -/* {{{ proto void pdf_setflat(int pdfdoc, double value)
333 +/* {{{ proto void pdf_setflat(int pdfdoc, float value)
335 PHP_FUNCTION(pdf_setflat)
337 @@ -1147,7 +1172,7 @@
341 -/* {{{ proto void pdf_setmiterlimit(int pdfdoc, double value)
342 +/* {{{ proto void pdf_setmiterlimit(int pdfdoc, float value)
344 PHP_FUNCTION(pdf_setmiterlimit)
346 @@ -1173,7 +1198,7 @@
350 -/* {{{ proto void pdf_setlinewidth(int pdfdoc, double width)
351 +/* {{{ proto void pdf_setlinewidth(int pdfdoc, float width)
353 PHP_FUNCTION(pdf_setlinewidth)
355 @@ -1192,7 +1217,7 @@
359 -/* {{{ proto void pdf_setdash(int pdfdoc, double black, double white)
360 +/* {{{ proto void pdf_setdash(int pdfdoc, float black, float white)
362 PHP_FUNCTION(pdf_setdash)
364 @@ -1212,7 +1237,7 @@
368 -/* {{{ proto void pdf_moveto(int pdfdoc, double x, double y)
369 +/* {{{ proto void pdf_moveto(int pdfdoc, float x, float y)
370 Sets current point */
371 PHP_FUNCTION(pdf_moveto)
373 @@ -1232,7 +1257,7 @@
377 -/* {{{ proto void pdf_curveto(int pdfdoc, double x1, double y1, double x2, double y2, double x3, double y3)
378 +/* {{{ proto void pdf_curveto(int pdfdoc, float x1, float y1, float x2, float y2, float x3, float y3)
380 PHP_FUNCTION(pdf_curveto)
382 @@ -1263,7 +1288,7 @@
386 -/* {{{ proto void pdf_lineto(int pdfdoc, double x, double y)
387 +/* {{{ proto void pdf_lineto(int pdfdoc, float x, float y)
389 PHP_FUNCTION(pdf_lineto)
391 @@ -1283,7 +1308,7 @@
395 -/* {{{ proto void pdf_circle(int pdfdoc, double x, double y, double radius)
396 +/* {{{ proto void pdf_circle(int pdfdoc, float x, float y, float radius)
398 PHP_FUNCTION(pdf_circle)
400 @@ -1304,7 +1329,7 @@
404 -/* {{{ proto void pdf_arc(int pdfdoc, double x, double y, double radius, double start, double end)
405 +/* {{{ proto void pdf_arc(int pdfdoc, float x, float y, float radius, float start, float end)
407 PHP_FUNCTION(pdf_arc)
409 @@ -1333,7 +1358,7 @@
413 -/* {{{ proto void pdf_rect(int pdfdoc, double x, double y, double width, double height)
414 +/* {{{ proto void pdf_rect(int pdfdoc, float x, float y, float width, float height)
416 PHP_FUNCTION(pdf_rect)
418 @@ -1552,7 +1577,7 @@
422 -/* {{{ proto void pdf_setgray_fill(int pdfdoc, double value)
423 +/* {{{ proto void pdf_setgray_fill(int pdfdoc, float value)
424 Sets filling color to gray value */
425 PHP_FUNCTION(pdf_setgray_fill)
427 @@ -1575,7 +1600,7 @@
431 -/* {{{ proto void pdf_setgray_stroke(int pdfdoc, double value)
432 +/* {{{ proto void pdf_setgray_stroke(int pdfdoc, float value)
433 Sets drawing color to gray value */
434 PHP_FUNCTION(pdf_setgray_stroke)
436 @@ -1598,7 +1623,7 @@
440 -/* {{{ proto void pdf_setgray(int pdfdoc, double value)
441 +/* {{{ proto void pdf_setgray(int pdfdoc, float value)
442 Sets drawing and filling color to gray value */
443 PHP_FUNCTION(pdf_setgray)
445 @@ -1621,7 +1646,7 @@
449 -/* {{{ proto void pdf_setrgbcolor_fill(int pdfdoc, double red, double green, double blue)
450 +/* {{{ proto void pdf_setrgbcolor_fill(int pdfdoc, float red, float green, float blue)
451 Sets filling color to RGB color value */
452 PHP_FUNCTION(pdf_setrgbcolor_fill)
454 @@ -1646,7 +1671,7 @@
458 -/* {{{ proto void pdf_setrgbcolor_stroke(int pdfdoc, double red, double green, double blue)
459 +/* {{{ proto void pdf_setrgbcolor_stroke(int pdfdoc, float red, float green, float blue)
460 Sets drawing color to RGB color value */
461 PHP_FUNCTION(pdf_setrgbcolor_stroke)
463 @@ -1671,7 +1696,7 @@
467 -/* {{{ proto void pdf_setrgbcolor(int pdfdoc, double red, double green, double blue)
468 +/* {{{ proto void pdf_setrgbcolor(int pdfdoc, float red, float green, float blue)
469 Sets drawing and filling color to RGB color value */
470 PHP_FUNCTION(pdf_setrgbcolor)
472 @@ -1798,7 +1823,7 @@
476 -/* {{{ proto void pdf_set_duration(int pdfdoc, double duration)
477 +/* {{{ proto void pdf_set_duration(int pdfdoc, float duration)
478 Sets duration between pages */
479 PHP_FUNCTION(pdf_set_duration)
481 @@ -1835,7 +1860,11 @@
482 convert_to_string_ex(arg2);
485 +# if ZEND_MODULE_API_NO >= 20010901
486 virtual_filepath(Z_STRVAL_PP(arg2), &image TSRMLS_CC);
488 + virtual_filepath(Z_STRVAL_PP(arg2), &image);
491 image = Z_STRVAL_PP(arg2);
493 @@ -1908,7 +1937,11 @@
494 convert_to_string_ex(arg3);
497 +# if ZEND_MODULE_API_NO >= 20010901
498 virtual_filepath(Z_STRVAL_PP(arg3), &image TSRMLS_CC);
500 + virtual_filepath(Z_STRVAL_PP(arg3), &image);
503 image = Z_STRVAL_PP(arg3);
505 @@ -2013,7 +2046,7 @@
509 -/* {{{ proto void pdf_place_image(int pdf, int pdfimage, double x, double y, double scale)
510 +/* {{{ proto void pdf_place_image(int pdf, int pdfimage, float x, float y, float scale)
511 Places image in the PDF document */
512 PHP_FUNCTION(pdf_place_image)
514 @@ -2076,7 +2109,7 @@
518 -/* {{{ proto void pdf_add_weblink(int pdfdoc, double llx, double lly, double urx, double ury, string url)
519 +/* {{{ proto void pdf_add_weblink(int pdfdoc, float llx, float lly, float urx, float ury, string url)
520 Adds link to web resource */
521 PHP_FUNCTION(pdf_add_weblink)
523 @@ -2103,7 +2136,7 @@
527 -/* {{{ proto void pdf_add_pdflink(int pdfdoc, double llx, double lly, double urx, double ury, string filename, int page, string dest)
528 +/* {{{ proto void pdf_add_pdflink(int pdfdoc, float llx, float lly, float urx, float ury, string filename, int page, string dest)
529 Adds link to PDF document */
530 PHP_FUNCTION(pdf_add_pdflink)
532 @@ -2135,7 +2168,7 @@
536 -/* {{{ proto void pdf_set_border_style(int pdfdoc, string style, double width)
537 +/* {{{ proto void pdf_set_border_style(int pdfdoc, string style, float width)
538 Sets style of box surounding all kinds of annotations and link */
539 PHP_FUNCTION(pdf_set_border_style)
541 @@ -2155,7 +2188,7 @@
545 -/* {{{ proto void pdf_set_border_color(int pdfdoc, double red, double green, double blue)
546 +/* {{{ proto void pdf_set_border_color(int pdfdoc, float red, float green, float blue)
547 Sets color of box surounded all kinds of annotations and links */
548 PHP_FUNCTION(pdf_set_border_color)
550 @@ -2176,7 +2209,7 @@
554 -/* {{{ proto void pdf_set_border_dash(int pdfdoc, double black, double white)
555 +/* {{{ proto void pdf_set_border_dash(int pdfdoc, float black, float white)
556 Sets the border dash style of all kinds of annotations and links */
557 PHP_FUNCTION(pdf_set_border_dash)
559 @@ -2196,7 +2229,7 @@
563 -/* {{{ proto void pdf_add_annotation(int pdfdoc, double xll, double yll, double xur, double xur, string title, string text)
564 +/* {{{ proto void pdf_add_annotation(int pdfdoc, float xll, float yll, float xur, float xur, string title, string text)
565 Sets annotation (depreciated use pdf_add_note instead) */
566 PHP_FUNCTION(pdf_add_annotation)
568 @@ -2247,7 +2280,7 @@
572 -/* {{{ proto void pdf_delete(int pdfdoc)
573 +/* {{{ proto bool pdf_delete(int pdfdoc)
574 Deletes the PDF object */
575 PHP_FUNCTION(pdf_delete)
577 @@ -2260,8 +2293,11 @@
579 ZEND_FETCH_RESOURCE(pdf, PDF *, arg1, -1, "pdf object", le_pdf);
582 - zend_list_delete(Z_LVAL_PP(arg1));
583 +#ifndef Z_RESVAL /* for php 4.0.3pl1 */
584 +#define Z_RESVAL(zval) (zval).value.lval
585 +#define Z_RESVAL_PP(zval_pp) Z_RESVAL(**zval_pp)
587 + zend_list_delete(Z_RESVAL_PP(arg1));
591 @@ -2406,7 +2442,7 @@
595 -/* {{{ proto void pdf_setpolydash(int pdfdoc, double darray)
596 +/* {{{ proto void pdf_setpolydash(int pdfdoc, float darray)
597 Sets more complicated dash pattern */
599 PHP_FUNCTION(pdf_setpolydash)
600 @@ -2436,10 +2472,10 @@
602 zend_hash_get_current_data(array, (void **) &keydataptr);
603 keydata = *keydataptr;
604 - if (keydata->type == IS_DOUBLE) {
605 - darray[i] = (float) keydata->value.dval;
606 - } else if (keydata->type == IS_LONG) {
607 - darray[i] = (float) keydata->value.lval;
608 + if (Z_TYPE_P(keydata) == IS_DOUBLE) {
609 + darray[i] = (float) Z_DVAL_P(keydata);
610 + } else if (Z_TYPE_P(keydata) == IS_LONG) {
611 + darray[i] = (float) Z_LVAL_P(keydata);
613 php_error(E_WARNING,"PDFlib set_polydash: illegal darray value");
615 @@ -2453,7 +2489,7 @@
619 -/* {{{ proto void pdf_concat(int pdf, double a, double b, double c, double d, double e, double f)
620 +/* {{{ proto void pdf_concat(int pdf, float a, float b, float c, float d, float e, float f)
621 Concatenates a matrix to the current transformation matrix for text and graphics */
622 PHP_FUNCTION(pdf_concat)
624 @@ -2502,7 +2538,11 @@
626 convert_to_string_ex(arg2);
628 +# if ZEND_MODULE_API_NO >= 20010901
629 virtual_filepath(Z_STRVAL_PP(arg2), &image TSRMLS_CC);
631 + virtual_filepath(Z_STRVAL_PP(arg2), &image);
634 image = Z_STRVAL_PP(arg2);
636 @@ -2551,7 +2591,11 @@
637 convert_to_string_ex(arg10);
640 +# if ZEND_MODULE_API_NO >= 20010901
641 virtual_filepath(Z_STRVAL_PP(arg4), &image TSRMLS_CC);
643 + virtual_filepath(Z_STRVAL_PP(arg4), &image);
646 image = Z_STRVAL_PP(arg4);
648 @@ -2571,7 +2615,7 @@
652 -/* {{{ proto void pdf_attach_file(int pdf, double lly, double lly, double urx, double ury, string filename, string description, string author, string mimetype, string icon)
653 +/* {{{ proto void pdf_attach_file(int pdf, float lly, float lly, float urx, float ury, string filename, string description, string author, string mimetype, string icon)
654 Adds a file attachment annotation at the rectangle specified by his lower left and upper right corners */
655 PHP_FUNCTION(pdf_attach_file)
657 @@ -2609,7 +2653,7 @@
661 -/* {{{ proto void pdf_add_note(int pdfdoc, double llx, double lly, double urx, double ury, string contents, string title, string icon, int open)
662 +/* {{{ proto void pdf_add_note(int pdfdoc, float llx, float lly, float urx, float ury, string contents, string title, string icon, int open)
664 PHP_FUNCTION(pdf_add_note)
666 @@ -2645,7 +2689,7 @@
670 -/* {{{ proto void pdf_add_locallink(int pdfdoc, double llx, double lly, double urx, double ury, int page, string dest)
671 +/* {{{ proto void pdf_add_locallink(int pdfdoc, float llx, float lly, float urx, float ury, int page, string dest)
672 Adds link to web resource */
673 PHP_FUNCTION(pdf_add_locallink)
675 @@ -2677,7 +2721,7 @@
679 -/* {{{ proto void pdf_add_launchlink(int pdfdoc, double llx, double lly, double urx, double ury, string filename)
680 +/* {{{ proto void pdf_add_launchlink(int pdfdoc, float llx, float lly, float urx, float ury, string filename)
681 Adds link to web resource */
682 PHP_FUNCTION(pdf_add_launchlink)
684 @@ -2729,7 +2773,11 @@
685 convert_to_long_ex(arg4);
688 +# if ZEND_MODULE_API_NO >= 20010901
689 virtual_filepath(Z_STRVAL_PP(arg2), &file TSRMLS_CC);
691 + virtual_filepath(Z_STRVAL_PP(arg2), &file);
694 file = Z_STRVAL_PP(arg2);
696 @@ -2792,7 +2840,7 @@
700 -/* {{{ proto void pdf_place_pdi_page(int pdf, int page, double x, double y, double sx, double sy)
701 +/* {{{ proto void pdf_place_pdi_page(int pdf, int page, float x, float y, float sx, float sy)
702 * Place a PDF page with the lower left corner at (x, y), and scale it. */
703 PHP_FUNCTION(pdf_place_pdi_page)
705 @@ -2875,7 +2923,7 @@
709 -/* {{{ proto double pdf_get_pdi_value(int pdf, string key, int doc, int page, int index);
710 +/* {{{ proto float pdf_get_pdi_value(int pdf, string key, int doc, int page, int index);
711 * Get the contents of some PDI document parameter with numerical type. */
712 PHP_FUNCTION(pdf_get_pdi_value)
714 @@ -2904,7 +2952,7 @@
718 -/* {{{ proto int pdf_begin_pattern(int pdf, double width, double height, double xstep, double ystep, int painttype);
719 +/* {{{ proto int pdf_begin_pattern(int pdf, float width, float height, float xstep, float ystep, int painttype);
720 * Start a new pattern definition. */
721 PHP_FUNCTION(pdf_begin_pattern)
723 @@ -2954,7 +3002,7 @@
727 -/* {{{ proto int pdf_begin_template(int pdf, double width, double height);
728 +/* {{{ proto int pdf_begin_template(int pdf, float width, float height);
729 * Start a new template definition. */
730 PHP_FUNCTION(pdf_begin_template)
732 @@ -2999,7 +3047,7 @@
736 -/* {{{ proto void pdf_setcolor(int pdf, string type, string colorspace, double c1 [, double c2 [, double c3 [, double c4]]]);
737 +/* {{{ proto void pdf_setcolor(int pdf, string type, string colorspace, float c1 [, float c2 [, float c3 [, float c4]]]);
738 * Set the current color space and color. */
739 PHP_FUNCTION(pdf_setcolor)
741 @@ -3087,7 +3135,7 @@
745 -/* {{{ proto void pdf_arcn(int pdf, double x, double y, double r, double alpha, double beta);
746 +/* {{{ proto void pdf_arcn(int pdf, float x, float y, float r, float alpha, float beta);
747 * Draw a clockwise circular arc from alpha to beta degrees. */
748 PHP_FUNCTION(pdf_arcn)
750 @@ -3158,10 +3206,10 @@
754 -/* {{{ proto void pdf_setmatrix(int pdf, double a, double b, double c, double d, double e, double f)
755 +/* {{{ proto void pdf_setmatrix(int pdf, float a, float b, float c, float d, float e, float f)
756 Explicitly set the current transformation matrix. */
757 PHP_FUNCTION(pdf_setmatrix)
760 zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7;
763 @@ -3189,6 +3237,7 @@
768 #endif /* PDFlib >= V4 */
771 @@ -3198,6 +3247,6 @@
775 - * vim600: sw=4 ts=4 tw=78 fdm=marker
776 - * vim<600: sw=4 ts=4 tw=78
777 + * vim600: sw=4 ts=4 fdm=marker
778 + * vim<600: sw=4 ts=4
780 --- php-4.1.2/ext/pdf/php_pdf.h.wiget Tue Aug 7 19:26:32 2001
781 +++ php-4.1.2/ext/pdf/php_pdf.h Mon Dec 3 21:53:06 2001
783 +----------------------------------------------------------------------+
789 + Id: php_pdf.h,v 1.22 2001/11/30 04:46:35 sniper Exp */
796 -/* with version 2.20 of pdflib PDF_open_mem isn't available unless
797 - the following define isn't there.
799 -#define PDF_OPEN_MEM_SUPPORTED
802 extern zend_module_entry pdf_module_entry;