[cairo-commit] libpixman/src ictrap.c,1.14,1.15

Carl Worth commit at pdx.freedesktop.org
Thu Jan 13 18:09:00 PST 2005


Committed by: cworth

Update of /cvs/cairo/libpixman/src
In directory gabe:/tmp/cvs-serv14494/src

Modified Files:
	ictrap.c 
Log Message:

        (IcRasterizeTrapezoid): Fix the above correction so that it
        doesn't force 0 alpha when the left edge is positioned above but
        slopes so as to contain some of the pixel.


Index: ictrap.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/ictrap.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- ictrap.c	13 Jan 2005 22:53:14 -0000	1.14
+++ ictrap.c	14 Jan 2005 02:08:57 -0000	1.15
@@ -1233,8 +1233,12 @@
 	     * situations. This defect in the algorithm is bad enough
 	     * that we plan to discard the current approach
 	     * entirely. But in the meantime, we do want to have the
-	     * correct alpha == 0 in these cases. */
-	    if (left.lower.y < y)
+	     * correct alpha == 0 in these cases.
+	     *
+	     * The left edge is entirely "above" if its lower y
+	     * coordinate is less than y, *and* its slope is positive.
+	     */
+	    if (left.lower.y < y && left.m > 0)
 		alpha = 0;
 	    else
 		alpha = (RectAlpha (pixel_y, y, y_next, depth)




More information about the cairo-commit mailing list