GD is an open source code library for the dynamic creation of images by programmers. GD is written in C, and “wrappers” are available for Perl, PHP and other languages. GD creates PNG, JPEG and GIF images, among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve web site development.
See the GD website for more informations.
FS#65 — gdImageSetThickness() has no effect on Anti Aliased Lines
Opened by Someone Insignificant (isomeone) - Thursday, 29 March 2007, 23:37 GMT+2
Last edited by Pierre Joye (Pierre) - Thursday, 03 May 2007, 23:57 GMT+2
|
DetailsI tried drawing an anti-aliased line with gdImageLine() on a true color image and it worked. The line was anti-aliased. Then I added a call to gdImageSetThickness() just before the call to gdImageLine() and it had no effect. I then changed the color of the line being draw to white and commented out the call to gdImageSetAntiAliased() and the line was drawn at the new thickness, so it appears either a) anti-aliased lines cannot be draw except with a thickness of 1, or b) this is a bug. It would be nice if this were fixed. |
it is a). Antialias is not supported in primitives when a thickness larger than 1 is used.
We plan to support AA and thickness in 2.1.0. I change the report to a feature request.
See some resulting of my current work on a new set of polygon functions. They add full anti aliasing support (incl. alpha) and support of polygons with holes (like a big O for example), many polygons can be used to construct a complex shapes or a simple trapezoid to draw thick lines.
An example: http://pierre.libgd.org/polygons/
I just encountered the same problem, when will the 2.1.0 released to solve this issue? I got the up-to-date code from CVS and seems it is still not work for this issus. The test result of polygon drawing you provided at http://pierre.libgd.org/polygons/ is so good, do these polygon functions involved in the up-to-date CVS code ?(seems not)
And I test the 2.0.35 API function gdImagePolygon, but did not get the anti-aliased effect, did i missing something?
thanks and regards, leo.