From 166dffc96aa26b21f87f12af22b11630583cc85b Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 21 Nov 2006 20:57:01 -0800 Subject: [PATCH] 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. --- test/clip-operator.c | 4 ++-- 1 file 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"); }