summaryrefslogtreecommitdiff
path: root/Build/source/libs/gd/libgd-src/tests/gdimageline/bug00077.c
blob: d69e88177f280c51fc30117f89e20b1afb1ee346 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "gd.h"
#include "gdtest.h"

int main()
{
	gdImagePtr im;
	const char *exp = "bug00077_exp.png";
	int error = 0;

	char path[1024];


	im = gdImageCreateTrueColor(11, 11);
	gdImageFilledRectangle(im, 0, 0, 10, 10, 0xFFFFFF);
	gdImageSetThickness(im, 1);

	gdImageLine(im, 0, 10, 0, 0, 0x0);
	gdImageLine(im, 5, 10, 5, 0, 0x0);
	gdImageLine(im, 10, 5, 0, 5, 0x0);
	gdImageLine(im, 10, 10, 0, 10, 0x0);

	sprintf(path, "%s/gdimageline/%s", GDTEST_TOP_DIR, exp);

	if (!gdAssertImageEqualsToFile(path, im)) {
		error = 1;
	}

	gdImageDestroy(im);

	return error;
}