summaryrefslogtreecommitdiff
path: root/src/cairo_traps.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2003-07-19 05:19:32 +0000
committerCarl Worth <cworth@cworth.org>2003-07-19 05:19:32 +0000
commit92284e4ac81e92c108b60efe0ce7c5301b419d11 (patch)
tree149660a877b33f55662dee40b4a54108c356fbe0 /src/cairo_traps.c
parent84ed2d465fecd2d2fcf0a68a9c654f220f9119d7 (diff)
Fixed polygon tesselattion for some cases of incorrect sorting when two intersections are very near the same vertical position.
Diffstat (limited to 'src/cairo_traps.c')
-rw-r--r--src/cairo_traps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cairo_traps.c b/src/cairo_traps.c
index c0afa3d31..4fa906d7b 100644
--- a/src/cairo_traps.c
+++ b/src/cairo_traps.c
@@ -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;
}
}
}