summaryrefslogtreecommitdiff
path: root/test/clip-operator.c
diff options
context:
space:
mode:
authorDan Amelang <dan@amelang.net>2006-12-01 12:46:55 -0800
committerDan Amelang <dan@amelang.net>2006-12-01 12:46:55 -0800
commitd5fcbfc29f2ae6eacdab1d00d9e7ce8d1cf39431 (patch)
tree4020397fa528aa5b637635f08a9f5d7d8aa1a117 /test/clip-operator.c
parentcb9a3c264086d0d11b74c504e5d3f891f929b00e (diff)
downloadcairo-d5fcbfc29f2ae6eacdab1d00d9e7ce8d1cf39431.tar.gz
Purge cairo-test of all calls to round()
Although round() is in the C99 standard, it isn't available in all toolchains on which cairo is compiled (VC++, for example).
Diffstat (limited to 'test/clip-operator.c')
-rw-r--r--test/clip-operator.c4
1 files changed, 2 insertions, 2 deletions
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");
}