CVS update: php3/functions

From: Date: Thu, 01 Jul 1999 15:28:50 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-7941@lists.php.net to get a copy of this message
Date: Thursday July 1, 1999 @ 11:28 Author: steinm Update of /repository/php3/functions In directory php:/tmp/cvs-serv29595/functions Modified Files: pdf.c Log Message: - added pdf_add_weblink() (not tested) Index: php3/functions/pdf.c diff -u php3/functions/pdf.c:1.35 php3/functions/pdf.c:1.36 --- php3/functions/pdf.c:1.35 Wed Jun 30 16:40:31 1999 +++ php3/functions/pdf.c Thu Jul 1 11:28:49 1999 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdf.c,v 1.35 1999/06/30 20:40:31 steinm Exp $ */ +/* $Id: pdf.c,v 1.36 1999/07/01 15:28:49 steinm Exp $ */ /* pdflib 0.6 is subject to the ALADDIN FREE PUBLIC LICENSE. Copyright (C) 1997 Thomas Merz. */ @@ -2376,6 +2376,37 @@ convert_to_double(arg5); PDF_execute_image(pdf, pdf_image, (float) arg3->value.dval, (float) arg4->value.dval, arg5->value.dval); + + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto void pdf_add_weblink(int pdfdoc, double llx, double lly, double urx, double ury, string url) + Adds link to web resource */ +void php3_pdf_add_weblink(INTERNAL_FUNCTION_PARAMETERS) { + pval *arg1, *arg2, *arg3, *arg4, *arg5, *arg6; + int id, type; + PDF *pdf; + PDF_TLS_VARS; + + if (ARG_COUNT(ht) != 6 || getParameters(ht, 6, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6) == FAILURE) { + WRONG_PARAM_COUNT; + } + + convert_to_long(arg1); + convert_to_double(arg2); + convert_to_double(arg3); + convert_to_double(arg4); + convert_to_double(arg5); + convert_to_string(arg6); + 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_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; }

« previous php.dev (#7941) next »