diff options
author | Carl Worth <cworth@cworth.org> | 2003-07-19 14:02:43 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2003-07-19 14:02:43 +0000 |
commit | 6ef8b5cdf46e376f917797c0cd97758e31cec8b7 (patch) | |
tree | 960b55f547cf0f9f26564ada6a406a22f4a778fd /src/cairo-traps.c | |
parent | 92284e4ac81e92c108b60efe0ce7c5301b419d11 (diff) |
Better fix for the previous bug. More complete and more efficient.
Diffstat (limited to 'src/cairo-traps.c')
-rw-r--r-- | src/cairo-traps.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/cairo-traps.c b/src/cairo-traps.c index 4fa906d7b..db2a49cb3 100644 --- a/src/cairo-traps.c +++ b/src/cairo-traps.c @@ -531,18 +531,14 @@ cairo_traps_tessellate_polygon (cairo_traps_t *traps, next_y = e->edge.p2.y; /* check intersect */ if (en && e->current_x != en->current_x) - { - if (_lines_intersect (&e->edge, &en->edge, &intersect)) - 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 (_lines_intersect (&e->edge, &en->edge, &intersect)) { + /* Need to make sure that when we next compute X + values for these two edges, that they will sort + as if after the intersection. */ + intersect++; + if (intersect > y && intersect < next_y) next_y = intersect; - } - } + } } /* check next inactive point */ if (inactive < num_edges && edges[inactive].edge.p1.y < next_y) |