|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-06-28 05:03 UTC] cedric dot scheyder at alcatel dot fr
PHP_FUNCTION(pdf_setcolor) {
zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7;
PDF *pdf;
float c1; <========== TO BE MODIFIED !!!!!!!!!! (replace the int by a float)
if (ZEND_NUM_ARGS() != 7 || zend_get_parameters_ex(7, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(pdf, PDF *, arg1, -1, "pdf object", le_pdf);
convert_to_string_ex(arg2);
convert_to_string_ex(arg3);
convert_to_double_ex(arg4);
convert_to_double_ex(arg5);
convert_to_double_ex(arg6);
convert_to_double_ex(arg7);
if (0 == (strcmp(Z_STRVAL_PP(arg3), "spot"))) {
c1 = (int) Z_DVAL_PP(arg4)-PDFLIB_SPOT_OFFSET;
} else if(0 == (strcmp(Z_STRVAL_PP(arg3), "pattern"))) {
c1 = (int) Z_DVAL_PP(arg4)-PDFLIB_PATTERN_OFFSET;
} else {
c1 = (float) Z_DVAL_PP(arg4);
}
PDF_setcolor(pdf,
Z_STRVAL_PP(arg2),
Z_STRVAL_PP(arg3),
(float) c1,
(float) Z_DVAL_PP(arg5),
(float) Z_DVAL_PP(arg6),
(float) Z_DVAL_PP(arg7));
RETURN_TRUE;
}
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
in pdf.c file: PHP_FUNCTION(pdf_setcolor) { zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7; PDF *pdf; /* int c1; */ float c1; <========== TO BE MODIFIED !!!!!!!!!! (replace the int by a float) if (ZEND_NUM_ARGS() != 7 || zend_get_parameters_ex(7, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &arg7) == FAILURE) { WRONG_PARAM_COUNT; } ZEND_FETCH_RESOURCE(pdf, PDF *, arg1, -1, "pdf object", le_pdf); convert_to_string_ex(arg2); convert_to_string_ex(arg3); convert_to_double_ex(arg4); convert_to_double_ex(arg5); convert_to_double_ex(arg6); convert_to_double_ex(arg7); if (0 == (strcmp(Z_STRVAL_PP(arg3), "spot"))) { c1 = (int) Z_DVAL_PP(arg4)-PDFLIB_SPOT_OFFSET; } else if(0 == (strcmp(Z_STRVAL_PP(arg3), "pattern"))) { c1 = (int) Z_DVAL_PP(arg4)-PDFLIB_PATTERN_OFFSET; } else { c1 = (float) Z_DVAL_PP(arg4); } PDF_setcolor(pdf, Z_STRVAL_PP(arg2), Z_STRVAL_PP(arg3), (float) c1, (float) Z_DVAL_PP(arg5), (float) Z_DVAL_PP(arg6), (float) Z_DVAL_PP(arg7)); RETURN_TRUE; }