Fixed polygon tesselattion for some cases of incorrect sorting when two intersections are very near the same vertical position.

This commit is contained in:
Carl Worth 2003-07-19 05:19:32 +00:00
parent 84ed2d465f
commit 92284e4ac8
2 changed files with 6 additions and 6 deletions

View file

@ -533,14 +533,14 @@ cairo_traps_tessellate_polygon (cairo_traps_t *traps,
if (en && e->current_x != en->current_x)
{
if (_lines_intersect (&e->edge, &en->edge, &intersect))
if (intersect > y) {
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 (intersect < next_y)
next_y = intersect;
next_y = intersect;
}
}
}

View file

@ -533,14 +533,14 @@ cairo_traps_tessellate_polygon (cairo_traps_t *traps,
if (en && e->current_x != en->current_x)
{
if (_lines_intersect (&e->edge, &en->edge, &intersect))
if (intersect > y) {
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 (intersect < next_y)
next_y = intersect;
next_y = intersect;
}
}
}