summaryrefslogtreecommitdiffstats
path: root/graphics/gd2/files/patch-gd.c
blob: 2ed96f17cfe5a8f1102a3fcc91346ad5beb933d5 (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
--- gd.c.orig	Sat Mar 29 17:25:42 2003
+++ gd.c	Wed May 14 16:46:34 2003
@@ -2696,6 +2696,16 @@
 void
 gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c)
 {
+	if (!n) {
+		return;
+	}
+	gdImageLine(im, p->x, p->y, p[n-1].x, p[n-1].y, c);
+	gdImageOpenPolygon(im, p, n, c);
+}	
+
+void
+gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
+{
   int i;
   int lx, ly;
   if (!n)
@@ -2710,7 +2720,6 @@
 
   lx = p->x;
   ly = p->y;
-  gdImageLine (im, lx, ly, p[n - 1].x, p[n - 1].y, c);
   for (i = 1; (i < n); i++)
     {
       p++;
OpenPOWER on IntegriCloud