rjs             Mon Mar  5 08:18:50 2001 EDT

  Modified files:              
    /php4/ext/pdf       pdf.c 
  Log:
  fixed bug in PDF_getbuffer (happend only on Windows)
  When using PDFlib V4.0 the pdf_set(grey/rgbcolor) functions are replaced
  by the PDFlib V4.0 function pdf_setcolor
  
  
Index: php4/ext/pdf/pdf.c
diff -u php4/ext/pdf/pdf.c:1.74 php4/ext/pdf/pdf.c:1.75
--- php4/ext/pdf/pdf.c:1.74     Thu Mar  1 11:51:53 2001
+++ php4/ext/pdf/pdf.c  Mon Mar  5 08:18:50 2001
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: pdf.c,v 1.74 2001/03/01 19:51:53 rjs Exp $ */
+/* $Id: pdf.c,v 1.75 2001/03/05 16:18:50 rjs Exp $ */
 /* Id: pdf.c,v 1.73 2001/02/26 06:07:11 andi Exp  */
 
 /* pdflib 2.02 ... 3.0x is subject to the ALADDIN FREE PUBLIC LICENSE.
@@ -293,7 +293,7 @@
 #else
        php_info_print_table_row(2, "PDFlib GmbH Version", tmp );
 #endif
-       php_info_print_table_row(2, "Revision", "$Revision: 1.74 $" );
+       php_info_print_table_row(2, "Revision", "$Revision: 1.75 $" );
        php_info_print_table_end();
 
 }
@@ -1498,7 +1498,11 @@
        ZEND_FETCH_RESOURCE(pdf, PDF *, arg1, -1, "pdf object", le_pdf);
 
        convert_to_double_ex(arg2);
+#if (PDFLIB_MAJORVERSION >= 4)
+       PDF_setcolor(pdf, "fill", "gray", (float) Z_DVAL_PP(arg2), 0, 0, 0);
+#else
        PDF_setgray_fill(pdf, (float) Z_DVAL_PP(arg2));
+#endif
        RETURN_TRUE;
 }
 /* }}} */
@@ -1517,7 +1521,11 @@
        ZEND_FETCH_RESOURCE(pdf, PDF *, arg1, -1, "pdf object", le_pdf);
 
        convert_to_double_ex(arg2);
+#if (PDFLIB_MAJORVERSION >= 4)
+       PDF_setcolor(pdf, "stroke", "gray", (float) Z_DVAL_PP(arg2), 0, 0, 0);
+#else
        PDF_setgray_stroke(pdf, (float) Z_DVAL_PP(arg2));
+#endif
        RETURN_TRUE;
 }
 /* }}} */
@@ -1536,7 +1544,11 @@
        ZEND_FETCH_RESOURCE(pdf, PDF *, arg1, -1, "pdf object", le_pdf);
 
        convert_to_double_ex(arg2);
+#if (PDFLIB_MAJORVERSION >= 4)
+       PDF_setcolor(pdf, "both", "gray", (float) Z_DVAL_PP(arg2), 0, 0, 0);
+#else
        PDF_setgray(pdf, (float) Z_DVAL_PP(arg2));
+#endif
        RETURN_TRUE;
 }
 /* }}} */
@@ -1557,7 +1569,11 @@
        convert_to_double_ex(arg2);
        convert_to_double_ex(arg3);
        convert_to_double_ex(arg4);
+#if (PDFLIB_MAJORVERSION >= 4)
+       PDF_setcolor(pdf, "fill", "rgb", (float) Z_DVAL_PP(arg2), (float) 
+Z_DVAL_PP(arg3), (float) Z_DVAL_PP(arg4), 0);
+#else
        PDF_setrgbcolor_fill(pdf, (float) Z_DVAL_PP(arg2), (float) Z_DVAL_PP(arg3), 
(float) Z_DVAL_PP(arg4));
+#endif
        RETURN_TRUE;
 }
 /* }}} */
@@ -1578,7 +1594,11 @@
        convert_to_double_ex(arg2);
        convert_to_double_ex(arg3);
        convert_to_double_ex(arg4);
+#if (PDFLIB_MAJORVERSION >= 4)
+       PDF_setcolor(pdf, "stroke", "rgb", (float) Z_DVAL_PP(arg2), (float) 
+Z_DVAL_PP(arg3), (float) Z_DVAL_PP(arg4), 0);
+#else
        PDF_setrgbcolor_stroke(pdf, (float) Z_DVAL_PP(arg2), (float) Z_DVAL_PP(arg3), 
(float) Z_DVAL_PP(arg4));
+#endif
        RETURN_TRUE;
 }
 /* }}} */
@@ -1599,7 +1619,11 @@
        convert_to_double_ex(arg2);
        convert_to_double_ex(arg3);
        convert_to_double_ex(arg4);
+#if (PDFLIB_MAJORVERSION >= 4)
+       PDF_setcolor(pdf, "both", "rgb", (float) Z_DVAL_PP(arg2), (float) 
+Z_DVAL_PP(arg3), (float) Z_DVAL_PP(arg4), 0);
+#else
        PDF_setrgbcolor(pdf, (float) Z_DVAL_PP(arg2), (float) Z_DVAL_PP(arg3), (float) 
Z_DVAL_PP(arg4));
+#endif
        RETURN_TRUE;
 }
 /* }}} */
@@ -2179,11 +2203,7 @@
 
        if (argc == 2) {
                convert_to_string_ex(arg2);
-#ifdef VIRTUAL_DIR
-               virtual_filepath(Z_STRVAL_PP(arg2), &filename);
-#else
                filename = Z_STRVAL_PP(arg2);
-#endif
                pdf_file = PDF_open_file(pdf, filename);
        } else {
                /* open in memory */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to