diff --git a/pixman/ChangeLog b/pixman/ChangeLog index 1e9f5fb57..08c5f5778 100644 --- a/pixman/ChangeLog +++ b/pixman/ChangeLog @@ -3,6 +3,9 @@ * src/ictrap.c (IcRasterizeTrapezoid): Force alpha to 0 when the left edge is entirely above top. (This is a workaround for some bizarre edge effects in the current algorithm). + (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. 2005-01-07 Carl Worth diff --git a/pixman/src/ictrap.c b/pixman/src/ictrap.c index 684d976a5..027647fb9 100644 --- a/pixman/src/ictrap.c +++ b/pixman/src/ictrap.c @@ -1233,8 +1233,12 @@ IcRasterizeTrapezoid (pixman_image_t *pMask, * 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)