diff options
author | Carl Worth <cworth@cworth.org> | 2006-11-21 20:57:01 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2006-11-22 16:25:53 -0800 |
commit | 166dffc96aa26b21f87f12af22b11630583cc85b (patch) | |
tree | cd2c139fa15c17648e819a3c3f8bd0029971727f /test/clip-operator.c | |
parent | eaaeba170d4c8313443412d88ee63311723b546d (diff) | |
download | cairo-166dffc96aa26b21f87f12af22b11630583cc85b.tar.gz |
test/clip-operator: Use round to pass only integers to cairo_show_glyphs
We were previously passing half-integer values here, which will
not be robust to changes in the rounding mode used for
cairo_show_glyphs. Use round() to match the rounding expected
by the reference images.
Diffstat (limited to 'test/clip-operator.c')
-rw-r--r-- | test/clip-operator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/clip-operator.c b/test/clip-operator.c index 4e533c6ae..22bdab020 100644 --- a/test/clip-operator.c +++ b/test/clip-operator.c @@ -76,8 +76,8 @@ draw_glyphs (cairo_t *cr, int x, int y) cairo_text_extents (cr, "FG", &extents); cairo_move_to (cr, - x + (WIDTH - extents.width) / 2 - extents.x_bearing, - y + (HEIGHT - extents.height) / 2 - extents.y_bearing); + x + round ((WIDTH - extents.width) / 2) - extents.x_bearing, + y + round ((HEIGHT - extents.height) / 2) - extents.y_bearing); cairo_show_text (cr, "FG"); } |