(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.

This commit is contained in:
Carl Worth 2005-01-13 18:08:57 +00:00
parent 46baad20ee
commit b0de4a7d09
2 changed files with 9 additions and 2 deletions

View file

@ -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 <cworth@cworth.org>

View file

@ -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)