mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-03 21:50:26 +01:00
test: Use round to pass only integers to cairo_show_glyphs (in 3 more tests)
This is the same fix as in the recent commit (166dffc96a)
but for the same idiom that appears in the operator-clear,
operator-source, and unbounded-operator tests. This fixes
the failures that were introduced by the recent switch to
_cairo_lround.
This commit is contained in:
parent
11d21dbaa3
commit
fdbb820ece
3 changed files with 6 additions and 6 deletions
|
|
@ -89,8 +89,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");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -126,8 +126,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");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,8 +75,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