[cairo-commit] test/operator-clear.c test/operator-source.c
test/unbounded-operator.c
Carl Worth
cworth at kemper.freedesktop.org
Wed Nov 22 16:44:26 PST 2006
test/operator-clear.c | 4 ++--
test/operator-source.c | 4 ++--
test/unbounded-operator.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
New commits:
diff-tree fdbb820ece5e6ab970cf6a9b756eebf7283c0597 (from 11d21dbaa3604951f73b641e4d88723696157a8e)
Author: Carl Worth <cworth at cworth.org>
Date: Wed Nov 22 16:43:45 2006 -0800
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 (166dffc96aa26b21f87f12af22b11630583cc85b)
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.
diff --git a/test/operator-clear.c b/test/operator-clear.c
index f1e1aaa..5590e0f 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 + (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");
}
diff --git a/test/operator-source.c b/test/operator-source.c
index bb19d37..555eb25 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 + (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");
}
diff --git a/test/unbounded-operator.c b/test/unbounded-operator.c
index 22ef9a0..6a9f617 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 + (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");
}
More information about the cairo-commit
mailing list