[cairo-commit] src/cairo-scaled-font.c

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Thu May 19 11:45:29 PDT 2011


 src/cairo-scaled-font.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bdfd860ae7a4e5fd7157748f90b0d8c6cc04e5ca
Author: Jeff Muizelaar <jmuizelaar at mozilla.com>
Date:   Thu May 19 14:43:34 2011 -0400

    Avoid implicit conversion to double when rounding

diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 8759a8a..1a95cda 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -2101,14 +2101,14 @@ _cairo_scaled_font_glyph_device_extents (cairo_scaled_font_t	 *scaled_font,
 	}
 
 	if (round_glyph_positions == CAIRO_ROUND_GLYPH_POS_ON)
-	    x = _cairo_fixed_from_double (_cairo_lround (glyphs[i].x));
+	    x = _cairo_fixed_from_int (_cairo_lround (glyphs[i].x));
 	else
 	    x = _cairo_fixed_from_double (glyphs[i].x);
 	x1 = x + scaled_glyph->bbox.p1.x;
 	x2 = x + scaled_glyph->bbox.p2.x;
 
 	if (round_glyph_positions == CAIRO_ROUND_GLYPH_POS_ON)
-	    y = _cairo_fixed_from_double (_cairo_lround (glyphs[i].y));
+	    y = _cairo_fixed_from_int (_cairo_lround (glyphs[i].y));
 	else
 	    y = _cairo_fixed_from_double (glyphs[i].y);
 	y1 = y + scaled_glyph->bbox.p1.y;


More information about the cairo-commit mailing list