summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-08-19 14:37:42 +0000
committerCarl Worth <cworth@cworth.org>2005-08-19 14:37:42 +0000
commit3ec312f7289192cca3ce71d8bafee27f49cf2aa2 (patch)
treef1cf35c1b8830d93ee74a3bb8945b12e4e9b0054 /src
parent1f68f77a10e0d93e2a73000faa1bb0097c8b056a (diff)
Fix for bug #4137:
Fix to round properly.
Diffstat (limited to 'src')
-rw-r--r--src/cairo-fixed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-fixed.c b/src/cairo-fixed.c
index 2c1c5872..604c9e72 100644
--- a/src/cairo-fixed.c
+++ b/src/cairo-fixed.c
@@ -45,7 +45,7 @@ _cairo_fixed_from_int (int i)
cairo_fixed_t
_cairo_fixed_from_double (double d)
{
- return (cairo_fixed_t) (d * 65536);
+ return (cairo_fixed_t) floor (d * 65536 + 0.5);
}
cairo_fixed_t