cvs commit
| From: | steinm | Date: | Mon, 05 Jul 1999 11:17:36 +0000 |
| Subject: | cvs commit | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-8101@lists.php.net to get a copy of this message | ||
From: steinm
Date: Mon Jul 5 11:17:36 1999
Modified files:
php3/functions/pdf.c
php3/functions/php3_pdf.h
Log message:
- some more minor changes
Index: php3/functions/pdf.c
diff -u php3/functions/pdf.c:1.37 php3/functions/pdf.c:1.38
--- php3/functions/pdf.c:1.37 Thu Jul 1 16:21:40 1999
+++ php3/functions/pdf.c Mon Jul 5 11:17:36 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdf.c,v 1.37 1999/07/01 20:21:40 steinm Exp $ */
+/* $Id: pdf.c,v 1.38 1999/07/05 15:17:36 steinm Exp $ */
/* pdflib 0.6 is subject to the ALADDIN FREE PUBLIC LICENSE.
Copyright (C) 1997 Thomas Merz. */
@@ -159,6 +159,8 @@
{"pdf_execute_image", php3_pdf_execute_image, NULL},
{"pdf_add_weblink", php3_pdf_add_weblink, NULL},
{"pdf_add_annotation", php3_pdf_add_annotation, NULL},
+ {"pdf_set_border_style", php3_pdf_set_border_style, NULL},
+ {"pdf_set_border_color", php3_pdf_set_border_color, NULL},
{NULL, NULL, NULL}
};
@@ -2442,6 +2444,63 @@
}
PDF_add_weblink(pdf, (float) arg2->value.dval, (float) arg3->value.dval, (float)
arg4->value.dval, (float) arg5->value.dval, arg6->value.str.val);
+
+ RETURN_TRUE;
+}
+/* }}} */
+
+/* {{{ proto void pdf_set_border_style(int pdfdoc, string style, double width)
+ Set style of box surounded weblinks */
+void php3_pdf_set_border_style(INTERNAL_FUNCTION_PARAMETERS) {
+ pval *arg1, *arg2, *arg3;
+ int id, type;
+ PDF *pdf;
+ PDF_TLS_VARS;
+
+ if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long(arg1);
+ convert_to_string(arg2);
+ convert_to_double(arg3);
+ id=arg1->value.lval;
+ pdf = php3_list_find(id,&type);
+ if(!pdf || type!=PDF_GLOBAL(le_pdf)) {
+ php3_error(E_WARNING,"Unable to find file identifier %d",id);
+ RETURN_FALSE;
+ }
+
+ PDF_set_border_style(pdf, arg2->value.str.val, (float) arg3->value.dval);
+
+ RETURN_TRUE;
+}
+/* }}} */
+
+/* {{{ proto void pdf_set_border_color(int pdfdoc, double red, double green, double blue)
+ Set color of box surounded weblinks */
+void php3_pdf_set_border_color(INTERNAL_FUNCTION_PARAMETERS) {
+ pval *arg1, *arg2, *arg3, *arg4;
+ int id, type;
+ PDF *pdf;
+ PDF_TLS_VARS;
+
+ if (ARG_COUNT(ht) != 4 || getParameters(ht, 4, &arg1, &arg2, &arg3, &arg4) ==
FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long(arg1);
+ convert_to_double(arg2);
+ convert_to_double(arg3);
+ convert_to_double(arg4);
+ id=arg1->value.lval;
+ pdf = php3_list_find(id,&type);
+ if(!pdf || type!=PDF_GLOBAL(le_pdf)) {
+ php3_error(E_WARNING,"Unable to find file identifier %d",id);
+ RETURN_FALSE;
+ }
+
+ PDF_set_border_color(pdf, (float) arg2->value.dval, (float) arg3->value.dval, (float)
arg4->value.dval);
RETURN_TRUE;
}
Index: php3/functions/php3_pdf.h
diff -u php3/functions/php3_pdf.h:1.11 php3/functions/php3_pdf.h:1.12
--- php3/functions/php3_pdf.h:1.11 Thu Jul 1 16:21:40 1999
+++ php3/functions/php3_pdf.h Mon Jul 5 11:17:36 1999
@@ -26,7 +26,7 @@
| Authors: Uwe Steinmann |
+----------------------------------------------------------------------+
*/
-/* $Id: php3_pdf.h,v 1.11 1999/07/01 20:21:40 steinm Exp $ */
+/* $Id: php3_pdf.h,v 1.12 1999/07/05 15:17:36 steinm Exp $ */
#ifndef _PHP3_PDF_H
#define _PHP3_PDF_H
@@ -118,6 +118,8 @@
extern void php3_pdf_execute_image(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_pdf_add_weblink(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_pdf_add_annotation(INTERNAL_FUNCTION_PARAMETERS);
+extern void php3_pdf_set_border_style(INTERNAL_FUNCTION_PARAMETERS);
+extern void php3_pdf_set_border_color(INTERNAL_FUNCTION_PARAMETERS);
#else
#define pdf_module_ptr NULL
#endif