[Commit] cairo/src cairo_traps.c,1.2,1.3

Carl Worth commit at keithp.com
Sat Jul 19 15:02:45 PDT 2003


Committed by: cworth

Update of /local/src/CVS/cairo/src
In directory home.keithp.com:/tmp/cvs-serv20240/src

Modified Files:
	cairo_traps.c 
Log Message:
Better fix for the previous bug. More complete and more efficient.

Index: cairo_traps.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo_traps.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cairo_traps.c	19 Jul 2003 12:19:32 -0000	1.2
+++ cairo_traps.c	19 Jul 2003 21:02:43 -0000	1.3
@@ -531,18 +531,14 @@
 		next_y = e->edge.p2.y;
 	    /* check intersect */
 	    if (en && e->current_x != en->current_x)
-	    {
-		if (_lines_intersect (&e->edge, &en->edge, &intersect))
-		    if (intersect > y && intersect <= next_y)
-		    {
-			/* Need to guarantee that we get all the way past
-			   the intersection point so that the edges sort
-			   properly next time through the loop. */
-			if (_compute_x (&e->edge, intersect) < _compute_x (&en->edge, intersect))
-			    intersect++;
+		if (_lines_intersect (&e->edge, &en->edge, &intersect)) {
+		    /* Need to make sure that when we next compute X
+                       values for these two edges, that they will sort
+                       as if after the intersection. */
+		    intersect++;
+		    if (intersect > y && intersect < next_y)
 			next_y = intersect;
-		    }
-	    }
+		}
 	}
 	/* check next inactive point */
 	if (inactive < num_edges && edges[inactive].edge.p1.y < next_y)




More information about the Commit mailing list