summaryrefslogtreecommitdiff
path: root/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00106_gdimagerectangle.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00106_gdimagerectangle.c')
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00106_gdimagerectangle.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00106_gdimagerectangle.c b/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00106_gdimagerectangle.c
new file mode 100644
index 00000000000..21bf88b7440
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/tests/gdimagerectangle/bug00106_gdimagerectangle.c
@@ -0,0 +1,28 @@
+#include "gd.h"
+#include "gdtest.h"
+
+int main()
+{
+ gdImagePtr im;
+ int c1,c2,c3,c4;
+
+ im = gdImageCreateTrueColor(10,10);
+
+ if (!im) {
+ return 1;
+ }
+
+ gdImageRectangle(im, 1,1, 1,1, 0x50FFFFFF);
+ c1 = gdImageGetTrueColorPixel(im, 1, 1);
+ c2 = gdImageGetTrueColorPixel(im, 2, 1);
+ c3 = gdImageGetTrueColorPixel(im, 1, 2);
+ c4 = gdImageGetTrueColorPixel(im, 2, 2);
+ gdImageDestroy(im);
+
+ if (0x005e5e5e == c1 && 0x0 == c2 &&
+ 0x0 == c3 && 0x0 == c4) {
+ return 0;
+ } else {
+ return 1;
+ }
+}