cvs: gd(GD_2_0) /libgd gd.c

[email protected] ("Pierre-Alain Joye")
Newsgroups php.gd.cvs
Message-ID <cvspajoye1176571653@cvsserver>
pajoye		Sat Apr 14 17:27:33 2007 UTC

  Modified files:              (Branch: GD_2_0)
    /gd/libgd	gd.c 
  Log:
  - #74, gdImageFilledArc, huge CPU usage with large angles
  
  
http://cvs.php.net/viewvc.cgi/gd/libgd/gd.c?r1=1.49.2.5&r2=1.49.2.6&diff_format=u
Index: gd/libgd/gd.c
diff -u gd/libgd/gd.c:1.49.2.5 gd/libgd/gd.c:1.49.2.6
--- gd/libgd/gd.c:1.49.2.5	Mon Apr  9 16:18:43 2007
+++ gd/libgd/gd.c	Sat Apr 14 17:27:32 2007
@@ -1,4 +1,4 @@
-/* $Id: gd.c,v 1.49.2.5 2007/04/09 16:18:43 pajoye Exp $ */
+/* $Id: gd.c,v 1.49.2.6 2007/04/14 17:27:32 pajoye Exp $ */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -1597,6 +1597,15 @@
   int i;
   int lx = 0, ly = 0;
   int fx = 0, fy = 0;
+
+	if (s > 360) {
+		s = s % 360;
+	}
+
+	if (e > 360) {
+		e = e % 360;
+	}
+
   while (e < s)
     {
       e += 360;
@@ -1610,7 +1619,7 @@
 	{
 	  if (!(style & gdChord))
 	    {
-	      if (style & gdNoFill)
+		if (style & gdNoFill)
 		{
 		  gdImageLine (im, lx, ly, x, y, color);
 		}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.