diff options
Diffstat (limited to 'Build/source/libs/gd/libgd-2.1.0-rc1/tests/gdimageline/bug00072.c')
-rw-r--r-- | Build/source/libs/gd/libgd-2.1.0-rc1/tests/gdimageline/bug00072.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Build/source/libs/gd/libgd-2.1.0-rc1/tests/gdimageline/bug00072.c b/Build/source/libs/gd/libgd-2.1.0-rc1/tests/gdimageline/bug00072.c new file mode 100644 index 00000000000..c3a3137e539 --- /dev/null +++ b/Build/source/libs/gd/libgd-2.1.0-rc1/tests/gdimageline/bug00072.c @@ -0,0 +1,35 @@ +#include "gd.h" +#include "gdtest.h" + +int main() +{ + gdImagePtr im; + const char *exp = "bug00072_exp.png"; + int error = 0; + + char path[1024]; + + + im = gdImageCreateTrueColor(11, 11); + gdImageFilledRectangle(im, 0, 0, 10, 10, 0xFFFFFF); + gdImageSetThickness(im, 3); + + gdImageLine(im, 5, 0, 5, 11, 0x000000); + gdImageLine(im, 0, 5, 11, 5, 0x000000); + gdImageLine(im, 0, 0, 11, 11, 0x000000); + + gdImageSetThickness(im, 1); + + gdImageLine(im, 5, 0, 5, 11, 0xFF0000); + gdImageLine(im, 0, 5, 11, 5, 0xFF0000); + gdImageLine(im, 0, 0, 11, 11, 0xFF0000); + + sprintf(path, "%s/gdimageline/%s", GDTEST_TOP_DIR, exp); + if (!gdAssertImageEqualsToFile(path, im)) { + error = 1; + } + + gdImageDestroy(im); + + return error; +} |