|
Lines 1-12
Link Here
|
| 1 |
--- gd.c Thu Apr 25 14:15:15 2002 |
1 |
--- gd.c.orig Sat Mar 29 17:25:42 2003 |
| 2 |
+++ gd.c Thu Apr 25 12:43:55 2002 |
2 |
+++ gd.c Wed May 14 16:46:34 2003 |
| 3 |
@@ -2211,7 +2230,17 @@ |
3 |
@@ -2696,6 +2696,16 @@ |
| 4 |
} |
|
|
| 5 |
|
| 6 |
void |
4 |
void |
| 7 |
-gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c) |
5 |
gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c) |
| 8 |
+gdImagePolygon(gdImagePtr im, gdPointPtr p, int n, int c) |
6 |
{ |
| 9 |
+{ |
|
|
| 10 |
+ if (!n) { |
7 |
+ if (!n) { |
| 11 |
+ return; |
8 |
+ return; |
| 12 |
+ } |
9 |
+ } |
|
Lines 16-40
Link Here
|
| 16 |
+ |
13 |
+ |
| 17 |
+void |
14 |
+void |
| 18 |
+gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c) |
15 |
+gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c) |
| 19 |
{ |
16 |
+{ |
| 20 |
int i; |
17 |
int i; |
| 21 |
int lx, ly; |
18 |
int lx, ly; |
| 22 |
@@ -2221,7 +2250,6 @@ |
19 |
if (!n) |
| 23 |
} |
20 |
@@ -2710,7 +2720,6 @@ |
|
|
21 |
|
| 24 |
lx = p->x; |
22 |
lx = p->x; |
| 25 |
ly = p->y; |
23 |
ly = p->y; |
| 26 |
- gdImageLine (im, lx, ly, p[n - 1].x, p[n - 1].y, c); |
24 |
- gdImageLine (im, lx, ly, p[n - 1].x, p[n - 1].y, c); |
| 27 |
for (i = 1; (i < n); i++) |
25 |
for (i = 1; (i < n); i++) |
| 28 |
{ |
26 |
{ |
| 29 |
p++; |
27 |
p++; |
| 30 |
@@ -2461,8 +2489,8 @@ |
|
|
| 31 |
{ |
| 32 |
for (x = 0; (x < sx); x++) |
| 33 |
{ |
| 34 |
- p1 = im1->pixels[y][x]; |
| 35 |
- p2 = im2->pixels[y][x]; |
| 36 |
+ p1 = im1->trueColor ? gdImageTrueColorPixel(im1, x, y) : gdImagePalettePixel(im1, x, y); |
| 37 |
+ p2 = im2->trueColor ? gdImageTrueColorPixel(im2, x, y) : gdImagePalettePixel(im2, x, y); |
| 38 |
if (gdImageRed (im1, p1) != gdImageRed (im2, p2)) |
| 39 |
{ |
| 40 |
cmpStatus |= GD_CMP_COLOR + GD_CMP_IMAGE; |