diff options
author | Carl Worth <cworth@cworth.org> | 2004-10-21 18:26:25 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2004-10-21 18:26:25 +0000 |
commit | 215d5c5a46b7523faa31d2f1d087123a7fd54f32 (patch) | |
tree | 067ab216216123313ba1fc20e81e1b85d071c745 /src/cairo-hull.c | |
parent | de115d07c35ec59e65d27bbfeced9af5a9df43c0 (diff) | |
download | cairo-215d5c5a46b7523faa31d2f1d087123a7fd54f32.tar.gz |
Fix comparison so that it results in a stable sort. This should fix some rendering bugs due to broken pens.
Diffstat (limited to 'src/cairo-hull.c')
-rw-r--r-- | src/cairo-hull.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cairo-hull.c b/src/cairo-hull.c index be464f369..37825b952 100644 --- a/src/cairo-hull.c +++ b/src/cairo-hull.c @@ -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; |