cvs: gd /libgd/tests/gdimagefilledrectangle bug00078.c

From: Date: Sun, 06 May 2007 17:54:53 +0000
Subject: cvs: gd /libgd/tests/gdimagefilledrectangle bug00078.c
Groups: php.gd.cvs 
Request: Send a blank email to php-gd-cvs+get-188@lists.php.net to get a copy of this message
pajoye Sun May 6 17:54:53 2007 UTC Modified files: /gd/libgd/tests/gdimagefilledrectangle bug00078.c Log: - MFB: #78, add test case http://cvs.php.net/viewvc.cgi/gd/libgd/tests/gdimagefilledrectangle/bug00078.c?r1=1.1&r2=1.2&diff_format=u Index: gd/libgd/tests/gdimagefilledrectangle/bug00078.c diff -u /dev/null gd/libgd/tests/gdimagefilledrectangle/bug00078.c:1.2 --- /dev/null Sun May 6 17:54:53 2007 +++ gd/libgd/tests/gdimagefilledrectangle/bug00078.c Sun May 6 17:54:53 2007 @@ -0,0 +1,37 @@ +#include "gd.h" +#include "gdtest.h" + +int main() +{ + gdImagePtr im; + int c1,c2,c3,c4,c5; + + im = gdImageCreateTrueColor(100,100); + gdImageFilledRectangle(im, 2,2, 80,95, 0x50FFFFFF); + c1 = gdImageGetTrueColorPixel(im, 2, 2); + c2 = gdImageGetTrueColorPixel(im, 80, 95); + c3 = gdImageGetTrueColorPixel(im, 80, 2); + c4 = gdImageGetTrueColorPixel(im, 2, 95); + c5 = gdImageGetTrueColorPixel(im, 49, 49); + + if (!(0x005e5e5e == c1 && 0x005e5e5e == c2 && + 0x005e5e5e == c3 && 0x005e5e5e == c4)) { + return 1; + } + gdImageFilledRectangle(im, 0, 0, 99, 99, 0x0); + + gdImageFilledRectangle(im, 80,95, 2,2, 0x50FFFFFF); + c1 = gdImageGetTrueColorPixel(im, 2, 2); + c2 = gdImageGetTrueColorPixel(im, 80, 95); + c3 = gdImageGetTrueColorPixel(im, 80, 2); + c4 = gdImageGetTrueColorPixel(im, 2, 95); + c5 = gdImageGetTrueColorPixel(im, 49, 49); + + if (!(0x005e5e5e == c1 && 0x005e5e5e == c2 && + 0x005e5e5e == c3 && 0x005e5e5e == c4)) { + return 1; + } + gdImageDestroy(im); + return 0; +} +

« previous php.gd.cvs (#188) next »