[cairo-commit] cairo/src cairo_ft_font.c,1.10,1.11

Carl Worth commit at pdx.freedesktop.org
Mon Dec 15 17:26:27 PST 2003


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory pdx:/tmp/cvs-serv22550/src

Modified Files:
	cairo_ft_font.c 
Log Message:

        * src/cairo_ft_font.c (DOUBLE_TO_16_16): Fix minor errors in
        fixed/floating-point conversion.


Index: cairo_ft_font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_ft_font.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** cairo_ft_font.c	15 Dec 2003 22:20:56 -0000	1.10
--- cairo_ft_font.c	16 Dec 2003 01:26:25 -0000	1.11
***************
*** 41,50 ****
  
  
! #define DOUBLE_TO_26_6(d) ((FT_F26Dot6)((d) * 63.0))
! #define DOUBLE_FROM_26_6(t) (((double)((t) >> 6)) \
! 			     + ((double)((t) & 0x3F) / 63.0))
! #define DOUBLE_TO_16_16(d) ((FT_Fixed)((d) * 65535.0))
! #define DOUBLE_FROM_16_16(t) (((double)((t) >> 16)) \
! 			      + ((double)((t) & 0xFFFF) / 65535.0))
  
  /* implement the platform-specific interface */
--- 41,48 ----
  
  
! #define DOUBLE_TO_26_6(d) ((FT_F26Dot6)((d) * 64.0))
! #define DOUBLE_FROM_26_6(t) ((double)(t) / 64.0)
! #define DOUBLE_TO_16_16(d) ((FT_Fixed)((d) * 65536.0))
! #define DOUBLE_FROM_16_16(t) ((double)(t) / 65536.0)
  
  /* implement the platform-specific interface */





More information about the cairo-commit mailing list