diff --git a/test/clip-operator.c b/test/clip-operator.c index 22bdab020..2e014a942 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 + round ((WIDTH - extents.width) / 2) - extents.x_bearing, - y + round ((HEIGHT - extents.height) / 2) - extents.y_bearing); + x + floor ((WIDTH - extents.width) / 2 + 0.5) - extents.x_bearing, + y + floor ((HEIGHT - extents.height) / 2 + 0.5) - extents.y_bearing); cairo_show_text (cr, "FG"); } diff --git a/test/operator-clear.c b/test/operator-clear.c index 5590e0f10..84123fb85 100644 --- a/test/operator-clear.c +++ b/test/operator-clear.c @@ -89,8 +89,8 @@ draw_glyphs (cairo_t *cr, int x, int y) cairo_text_extents (cr, "FG", &extents); cairo_move_to (cr, - x + round ((WIDTH - extents.width) / 2) - extents.x_bearing, - y + round ((HEIGHT - extents.height) / 2) - extents.y_bearing); + x + floor ((WIDTH - extents.width) / 2 + 0.5) - extents.x_bearing, + y + floor ((HEIGHT - extents.height) / 2 + 0.5) - extents.y_bearing); cairo_show_text (cr, "FG"); } diff --git a/test/operator-source.c b/test/operator-source.c index 555eb2512..9984ca2c9 100644 --- a/test/operator-source.c +++ b/test/operator-source.c @@ -126,8 +126,8 @@ draw_glyphs (cairo_t *cr, int x, int y) cairo_text_extents (cr, "FG", &extents); cairo_move_to (cr, - x + round ((WIDTH - extents.width) / 2) - extents.x_bearing, - y + round ((HEIGHT - extents.height) / 2) - extents.y_bearing); + x + floor ((WIDTH - extents.width) / 2 + 0.5) - extents.x_bearing, + y + floor ((HEIGHT - extents.height) / 2 + 0.5) - extents.y_bearing); cairo_show_text (cr, "FG"); } diff --git a/test/unbounded-operator.c b/test/unbounded-operator.c index 6a9f61795..7986c7c9c 100644 --- a/test/unbounded-operator.c +++ b/test/unbounded-operator.c @@ -75,8 +75,8 @@ draw_glyphs (cairo_t *cr, int x, int y) cairo_text_extents (cr, "FG", &extents); cairo_move_to (cr, - x + round ((WIDTH - extents.width) / 2) - extents.x_bearing, - y + round ((HEIGHT - extents.height) / 2) - extents.y_bearing); + x + floor ((WIDTH - extents.width) / 2 + 0.5) - extents.x_bearing, + y + floor ((HEIGHT - extents.height) / 2 + 0.5) - extents.y_bearing); cairo_show_text (cr, "FG"); }