mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 06:28:01 +02:00
Better fix for the previous bug. More complete and more efficient.
This commit is contained in:
parent
92284e4ac8
commit
6ef8b5cdf4
3 changed files with 23 additions and 22 deletions
|
|
@ -1,3 +1,12 @@
|
|||
2003-07-19 Carl Worth <cworth@isi.edu>
|
||||
|
||||
* src/cairo_traps.c (cairo_traps_tessellate_polygon): Fixed some
|
||||
sorting problems with two intersections very near the same
|
||||
vertical position. (There are still some reamining problems
|
||||
though).
|
||||
(cairo_traps_tessellate_polygon): Better fix for the same
|
||||
bug. Should cover all cases, (and it's moe efficient too).
|
||||
|
||||
2003-07-18 Carl Worth <cworth@east.isi.edu>
|
||||
|
||||
* src/cairo.h: Fixed some inconsistent tag/typedef names that were
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue