Author: tkreuzer
Date: Thu Nov 13 11:12:56 2014
New Revision: 65392
URL:
http://svn.reactos.org/svn/reactos?rev=65392&view=rev
Log:
[WIN32K]
Round to nearest integer in FIX2LONG, used in XFORMOBJ APIs. Fixes rounding errors when
doing coordinate transformation.
Modified:
trunk/reactos/win32ss/gdi/ntgdi/xformobj.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/xformobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/xformobj…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/xformobj.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/xformobj.c [iso-8859-1] Thu Nov 13 11:12:56 2014
@@ -13,7 +13,7 @@
#include <debug.h>
C_ASSERT(sizeof(FIX) == sizeof(LONG));
-#define FIX2LONG(x) ((x) >> 4)
+#define FIX2LONG(x) (((x) + 8) >> 4)
#define LONG2FIX(x) ((x) << 4)
#define FLOATOBJ_Equal _FLOATOBJ_Equal