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.
This commit is contained in:
Carl Worth 2006-11-21 20:57:01 -08:00
parent eaaeba170d
commit 166dffc96a

View file

@ -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");
}