diff options
Diffstat (limited to 'Build/source/libs/gd/gd-2.0.35/tests/gdimagefilltoborder/bug00037.c')
-rw-r--r-- | Build/source/libs/gd/gd-2.0.35/tests/gdimagefilltoborder/bug00037.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Build/source/libs/gd/gd-2.0.35/tests/gdimagefilltoborder/bug00037.c b/Build/source/libs/gd/gd-2.0.35/tests/gdimagefilltoborder/bug00037.c new file mode 100644 index 00000000000..561d776435b --- /dev/null +++ b/Build/source/libs/gd/gd-2.0.35/tests/gdimagefilltoborder/bug00037.c @@ -0,0 +1,30 @@ +#include <gd.h> +#include <stdio.h> +#include "gdtest.h" + +int main() +{ + gdImagePtr im; + int bordercolor, color; + + im = gdImageCreateTrueColor(100, 100); + + gdImageAlphaBlending(im, 1); + gdImageSaveAlpha(im, 1); + bordercolor = gdImageColorAllocateAlpha(im, 0, 0, 0, 2); + color = gdImageColorAllocateAlpha(im, 0, 0, 0, 1); + + gdImageFillToBorder(im, 5, 5, bordercolor, color); + + color = gdImageGetPixel(im, 5, 5); + + gdImageDestroy(im); + if (gdTestAssert(color==0x1000000)) { + return 0; + } else { + printf("c: %X, expected %X\n", color, 0x1000000); + return -1; + } + +} + |