From fc878f6e0ce40b68fea9d8dc3e51a6230487b255 Mon Sep 17 00:00:00 2001 From: longsonr Date: Sat, 27 Oct 2007 04:43:08 +0100 Subject: [PATCH] _cairo_win32_transform_FIXED_to_fixed is assuming that the GDI "FIXED" type is of the same format as _cairo_fixed_t. This only works when cairo is 16.16 --- src/cairo-win32-font.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c index 32e47df..1dab181 100644 --- a/src/cairo-win32-font.c +++ b/src/cairo-win32-font.c @@ -1317,10 +1317,8 @@ _cairo_win32_transform_FIXED_to_fixed (cairo_matrix_t *matrix, FIXED Fx, FIXED Fy, cairo_fixed_t *fx, cairo_fixed_t *fy) { - double x, y; - - x = _cairo_fixed_to_double (*((cairo_fixed_t *)&Fx)); - y = _cairo_fixed_to_double (*((cairo_fixed_t *)&Fy)); + double x = Fx.value + Fx.fract / 65536.0; + double y = Fy.value + Fy.fract / 65536.0; cairo_matrix_transform_point (matrix, &x, &y); *fx = _cairo_fixed_from_double (x); *fy = _cairo_fixed_from_double (y); -- 1.5.0.3