diff options
author | Ondřej Surý <ondrej@sury.org> | 2013-06-07 11:05:36 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2013-06-07 11:05:36 +0200 |
commit | b04815880021c81153a19192a7db3762c2b3ce56 (patch) | |
tree | a2f7c1561575a15ae225e2cbb3552fa56ce13dd8 /tests/gdimageline | |
parent | 9e32495071bdc980e6f49145f6ec46abe4b8b64c (diff) | |
download | libgd-b04815880021c81153a19192a7db3762c2b3ce56.tar.gz |
Add test for bitbucket issue #5
Diffstat (limited to 'tests/gdimageline')
-rw-r--r-- | tests/gdimageline/gdimageline_bug5.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/gdimageline/gdimageline_bug5.c b/tests/gdimageline/gdimageline_bug5.c new file mode 100644 index 0000000..ef57f6c --- /dev/null +++ b/tests/gdimageline/gdimageline_bug5.c @@ -0,0 +1,39 @@ +#include <stdio.h> +#include "gd.h" +#include "gdtest.h" + +int main() { + /* Declare the image */ + gdImagePtr im; + + /* Declare output files */ + /* FILE *pngout; */ + int black, white; + + im = gdImageCreateTrueColor(63318, 771); + + /* Allocate the color white (red, green and blue all maximum). */ + white = gdImageColorAllocate(im, 255, 255, 255); + /* Allocate the color white (red, green and blue all maximum). */ + black = gdImageColorAllocate(im, 0, 0, 0); + + /* white background */ + gdImageFill(im, 1, 1, white); + + gdImageSetAntiAliased(im, black); + + /* This line fails! */ + gdImageLine(im, 28562, 631, 34266, 750, gdAntiAliased); + + /* Open a file for writing. "wb" means "write binary", important under MSDOS, harmless under Unix. */ + /* pngout = fopen("test.png", "wb"); */ + + /* Output the image to the disk file in PNG format. */ + /* gdImagePng(im, pngout); */ + + /* Close the files. */ + /* fclose(pngout); */ + + /* Destroy the image in memory. */ + gdImageDestroy(im); +} |