ID: 24372 Updated by: [EMAIL PROTECTED] Reported By: lapo at lapo dot it -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: FreeBSD 4.8 PHP Version: 4.3.2 New Comment:
This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2004-07-06 10:12:46] lapo at lapo dot it Well, as I quoted in my last comment the docs say that the "size" and "angle" parameters are "int" values, while they are "double" values instead: http://cvs.php.net/co.php/php-src/ext/gd/gd.c?r=1.294#3217 To see why the proto is incorrect while the code is not, I just checked original GD's function, that accept "double" values as well: http://www.boutell.com/gd/manual2.0.27.html#gdImageStringFT Moreover, using "double" values for the "size" parameters works perfectly, I do it all the time in my website www.megatokyo.it (and, yes, sizes 8.0 and 8.5 and 9.0 give different results). ------------------------------------------------------------------------ [2004-07-05 23:42:40] [EMAIL PROTECTED] I've re-checked them and they are right. If you think that's not the case, please explain where/how the protos aren't correct. ------------------------------------------------------------------------ [2004-07-05 15:40:24] lapo at lapo dot it No, they are not. Not on the website, at least: http://it2.php.net/manual/it/function.imagettftext.php array imagettftext ( resource image, int size, int angle, int x, int y, int color, string fontfile, string text) http://it2.php.net/manual/it/function.imagefttext.php array imagefttext ( resource image, int size, int angle, int x, int y, int col, string font_file, string text [, array extrainfo]) ------------------------------------------------------------------------ [2004-07-05 12:12:11] [EMAIL PROTECTED] docs are right! ------------------------------------------------------------------------ [2003-06-28 05:22:14] lapo at lapo dot it Description: ------------ Both imagettftext and imagefttext contain at least one documentation error: "int size, int angle" should be "double size, double angle" as I read in ext/gd/gd.c around line 3080: convert_to_double_ex(PTSIZE); convert_to_double_ex(ANGLE); Page about imagefttext has another error: [, array extrainfo] but the function actualyl requires the last parameter to be present, it isn't optional. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24372&edit=1
