diff options
Diffstat (limited to 'Build/source/libs/gd/gd-2.0.35/tests/gdimagecopyrotated')
-rw-r--r-- | Build/source/libs/gd/gd-2.0.35/tests/gdimagecopyrotated/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Build/source/libs/gd/gd-2.0.35/tests/gdimagecopyrotated/bug00020.c | 32 | ||||
-rw-r--r-- | Build/source/libs/gd/gd-2.0.35/tests/gdimagecopyrotated/bug00020_exp.png | bin | 0 -> 402 bytes |
3 files changed, 42 insertions, 0 deletions
diff --git a/Build/source/libs/gd/gd-2.0.35/tests/gdimagecopyrotated/CMakeLists.txt b/Build/source/libs/gd/gd-2.0.35/tests/gdimagecopyrotated/CMakeLists.txt new file mode 100644 index 00000000000..36895633151 --- /dev/null +++ b/Build/source/libs/gd/gd-2.0.35/tests/gdimagecopyrotated/CMakeLists.txt @@ -0,0 +1,10 @@ + +SET(TESTS_FILES + bug00020 +) + +FOREACH(test_name ${TESTS_FILES}) + add_executable(${test_name} "${test_name}.c") + target_link_libraries (${test_name} gdTest ${GD_LIB}) + ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name}) +ENDFOREACH(test_name)
\ No newline at end of file diff --git a/Build/source/libs/gd/gd-2.0.35/tests/gdimagecopyrotated/bug00020.c b/Build/source/libs/gd/gd-2.0.35/tests/gdimagecopyrotated/bug00020.c new file mode 100644 index 00000000000..433ce6373e1 --- /dev/null +++ b/Build/source/libs/gd/gd-2.0.35/tests/gdimagecopyrotated/bug00020.c @@ -0,0 +1,32 @@ +/* $Id: bug00020.c,v 1.1.2.2 2007/04/10 20:32:36 pajoye Exp $ */ +#include "gd.h" +#include "gdtest.h" + +#define width 50 + +int main() +{ + gdImagePtr im, im2; + int error = 0; + char path[1024]; + + sprintf(path, "%s/gdimagecopyrotated/bug00020_exp.png", GDTEST_TOP_DIR); + + im = gdImageCreateTrueColor(width, width); + gdImageFilledRectangle(im, 0,0, width, width, 0xFF0000); + gdImageColorTransparent(im, 0xFF0000); + gdImageFilledEllipse(im, width/2, width/2, width - 20, width - 10, + 0x50FFFFFF); + + im2 = gdImageCreateTrueColor(width, width); + + gdImageCopyRotated(im2, im, width / 2, width / 2, 0,0, width, width, 60); + + if (!gdAssertImageEqualsToFile(path, im2)) { + error = 1; + } + + gdImageDestroy(im2); + gdImageDestroy(im); + return error; +} diff --git a/Build/source/libs/gd/gd-2.0.35/tests/gdimagecopyrotated/bug00020_exp.png b/Build/source/libs/gd/gd-2.0.35/tests/gdimagecopyrotated/bug00020_exp.png Binary files differnew file mode 100644 index 00000000000..f0a9c161b14 --- /dev/null +++ b/Build/source/libs/gd/gd-2.0.35/tests/gdimagecopyrotated/bug00020_exp.png |