Author: jimtabor
Date: Sun Aug 12 11:34:23 2007
New Revision: 28296
URL:
http://svn.reactos.org/svn/reactos?rev=28296&view=rev
Log:
Added two new subroutines in support for writing data to and from user space. Fixed calc
in CoordCnvP to use float not fixed.
Modified:
trunk/reactos/dll/win32/gdi32/objects/coord.c
trunk/reactos/subsystems/win32/win32k/eng/float.c
trunk/reactos/subsystems/win32/win32k/include/gdifloat.h
Modified: trunk/reactos/dll/win32/gdi32/objects/coord.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/co…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/coord.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/coord.c Sun Aug 12 11:34:23 2007
@@ -70,18 +70,20 @@
CoordCnvP(MATRIX_S * mx, LPPOINT Point)
{
FLOAT x, y;
- gxf_long a, b;
+ gxf_long a, b, c;
x = (FLOAT)Point->x;
y = (FLOAT)Point->y;
a.l = EFtoF( &mx->efM11 );
b.l = EFtoF( &mx->efM21 );
- x = x * a.f + y * b.f + mx->fxDx;
+ c.l = EFtoF( &mx->efDx );
+ x = x * a.f + y * b.f + c.f;
a.l = EFtoF( &mx->efM12 );
b.l = EFtoF( &mx->efM22 );
- y = x * a.f + y * b.f + mx->fxDy;
+ c.l = EFtoF( &mx->efDy );
+ y = x * a.f + y * b.f + c.f;
FLOAT_TO_INT(x, Point->x );
FLOAT_TO_INT(y, Point->y );
Modified: trunk/reactos/subsystems/win32/win32k/eng/float.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/float.c (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/float.c Sun Aug 12 11:34:23 2007
@@ -198,6 +198,43 @@
#endif
}
+VOID FASTCALL
+XForm2MatrixS( MATRIX_S * Matrix, PXFORM XForm)
+{
+gxf_long f;
+ f.f = XForm->eM11;
+ FtoEF( &Matrix->efM11, f.l);
+ f.f = XForm->eM12;
+ FtoEF( &Matrix->efM12, f.l);
+ f.f = XForm->eM21;
+ FtoEF( &Matrix->efM21, f.l);
+ f.f = XForm->eM22;
+ FtoEF( &Matrix->efM22, f.l);
+ f.f = XForm->eDx;
+ FtoEF( &Matrix->efDx, f.l);
+ f.f = XForm->eDy;
+ FtoEF( &Matrix->efDy, f.l);
+}
+
+VOID FASTCALL
+MatrixS2XForm( PXFORM XForm, MATRIX_S * Matrix)
+{
+gxf_long f;
+ f.l = EFtoF(&Matrix->efM11);
+ XForm->eM11 = f.f;
+ f.l = EFtoF(&Matrix->efM12);
+ XForm->eM12 = f.f;
+ f.l = EFtoF(&Matrix->efM21);
+ XForm->eM21 = f.f;
+ f.l = EFtoF(&Matrix->efM22);
+ XForm->eM22 = f.f;
+ f.l = EFtoF(&Matrix->efDx);
+ XForm->eDx = f.f;
+ f.l = EFtoF(&Matrix->efDy);
+ XForm->eDy = f.f;
+}
+
+
VOID
STDCALL
FLOATOBJ_AddLong(
Modified: trunk/reactos/subsystems/win32/win32k/include/gdifloat.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/gdifloat.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/gdifloat.h Sun Aug 12 11:34:23 2007
@@ -101,3 +101,7 @@
MulDiv((ty), (dc)->Dc_Attr.szlViewportExt.cy, (dc)->Dc_Attr.szlWindowExt.cy)
#endif
+
+VOID FASTCALL XForm2MatrixS( MATRIX_S *, PXFORM);
+VOID FASTCALL MatrixS2XForm( PXFORM, MATRIX_S *);
+