mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-30 22:38:12 +02:00
Fix comparison so that it results in a stable sort. This should fix some rendering bugs due to broken pens.
This commit is contained in:
parent
de115d07c3
commit
215d5c5a46
3 changed files with 14 additions and 4 deletions
|
|
@ -1,5 +1,9 @@
|
|||
2004-10-21 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* src/cairo_hull.c (_cairo_hull_vertex_compare): Fix comparison so
|
||||
that it results in a stable sort. This should fix some rendering
|
||||
bugs due to broken pens.
|
||||
|
||||
* TODO: Add items on custom caps and getting access to hidden
|
||||
image data
|
||||
|
||||
|
|
|
|||
|
|
@ -97,10 +97,13 @@ _cairo_hull_vertex_compare (const void *av, const void *bv)
|
|||
(cairo_fixed_48_16_t) a->slope.dy * a->slope.dy);
|
||||
b_dist = ((cairo_fixed_48_16_t) b->slope.dx * b->slope.dx +
|
||||
(cairo_fixed_48_16_t) b->slope.dy * b->slope.dy);
|
||||
if (a_dist < b_dist)
|
||||
if (a_dist < b_dist) {
|
||||
a->discard = 1;
|
||||
else
|
||||
ret = -1;
|
||||
} else {
|
||||
b->discard = 1;
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -97,10 +97,13 @@ _cairo_hull_vertex_compare (const void *av, const void *bv)
|
|||
(cairo_fixed_48_16_t) a->slope.dy * a->slope.dy);
|
||||
b_dist = ((cairo_fixed_48_16_t) b->slope.dx * b->slope.dx +
|
||||
(cairo_fixed_48_16_t) b->slope.dy * b->slope.dy);
|
||||
if (a_dist < b_dist)
|
||||
if (a_dist < b_dist) {
|
||||
a->discard = 1;
|
||||
else
|
||||
ret = -1;
|
||||
} else {
|
||||
b->discard = 1;
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue