ID: 11333 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: GD related Operating system: PHP Version: 4.0 Latest CVS (2001-06-07) Assigned To: Comments: I have fixed the bug with imagesetthickness() in CVS and in the release branch for PHP 4.0.6. The issue with imagedashedline() although is not solved and won't be as it is deprecated in the GD library. I have added documentation for imagesetstyle() into the documentation CVS (unfortunately the online manual isn't updated for a while..) and also put a note to imagedashedline() docs to inform people that they should use imagesetstyle + imageline instead. There seems to be some problems with creating thick dashed lines with the imagesetstyle+imageline combination though. But the bug in this case is in the GD library itself. --Jani Previous Comments: --------------------------------------------------------------------------- [2001-06-07 17:08:47] [EMAIL PROTECTED] Jani, I've tried with gd1.8.4 and have the same problem. it seems that ImageDashedLine is not broken in gd2 but in the gd2 readme you can read this: "void gdImageDashedLine(gdImagePtr im, int x1, int y1, int x2, int y2,int color) _(FUNCTION)_ gdImageDashedLine is provided _solely for backwards compatibility with gd 1.0. New programs should draw dashed lines using the normal gdImageLine function and the new gdImageSetStyle function." I looked for ImageSetStyle in php4 but this function is not supported. the problem with the ImageSetThickness function is that is recognised by the latest CVS but it does not do anything. the two things are illustrated in the script below : example script: <? // Send out the header info and create the initial blank canvas Header( "Content-type: image/png"); $image = imagecreate(100,100); $blue = ImageColorAllocate($image,0,0,255); $red = ImageColorAllocate($image,255,0,0); $grey = ImageColorAllocate($image,192,192,192); ImageFilledRectangle($image,0,0,100,100,$grey); $th=5; //$th can be whatever number : rectangle thickness does not change ImageSetThickness($image,$th); ImageRectangle($image,10,10,50,50,$blue); //vertical dashed line OK ImageDashedLine($image,80,10,80,50,$red); //horizontal dashed line ??? ImageDashedLine($image,10,70,80,70,$red); // output the GIF to the browser and free up memory ImagePng($image); ImageDestroy($image); ?> Frans --------------------------------------------------------------------------- [2001-06-07 15:17:51] [EMAIL PROTECTED] Are you sure that imagedashedline() isn't broken in GD 2.0.1 library itself? As the function in PHP hasn't changed for a long time now. Would it be possible for you to try this with GD 1.8.4 ? Also, do you get some error about imagesetthichkness()?? Define 'not working at all'.. --Jani + --------------------------------------------------------------------------- [2001-06-07 12:45:11] [EMAIL PROTECTED] I've installed php4.0 latest CVS with gd2.0.1 It seems that the functions ImageDashedLine and ImageSetThickness are not working correctly. ImageDashedLine works for vertical lines but not for horizontal lines (?). ImageSetThickness is not working at all. Frans Fierens Brussels, Belgium --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=11333&edit=2 -- PHP Development 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]