mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-06 16:40:19 +01:00
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:
parent
eaaeba170d
commit
166dffc96a
1 changed files with 2 additions and 2 deletions
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue