[ros-diffs] [jimtabor] 28184: Move Window and Viewport Ext and Org to Dc_Attr. Tested it with qemu.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Mon Aug 6 07:13:48 CEST 2007


Author: jimtabor
Date: Mon Aug  6 09:13:47 2007
New Revision: 28184

URL: http://svn.reactos.org/svn/reactos?rev=28184&view=rev
Log:
Move Window and Viewport Ext and Org to Dc_Attr. Tested it with qemu.

Modified:
    trunk/reactos/subsystems/win32/win32k/include/dc.h
    trunk/reactos/subsystems/win32/win32k/include/gdifloat.h
    trunk/reactos/subsystems/win32/win32k/objects/coord.c
    trunk/reactos/subsystems/win32/win32k/objects/dc.c
    trunk/reactos/subsystems/win32/win32k/objects/path.c
    trunk/reactos/subsystems/win32/win32k/objects/region.c

Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/include/dc.h?rev=28184&r1=28183&r2=28184&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/dc.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/dc.h Mon Aug  6 09:13:47 2007
@@ -88,15 +88,6 @@
   DRIVER_FUNCTIONS  DriverFunctions;
   UNICODE_STRING    DriverName;
   HANDLE  DeviceDriver;
-
-  INT  wndOrgX;          /* Window origin */
-  INT  wndOrgY;
-  INT  wndExtX;          /* Window extent */
-  INT  wndExtY;
-  INT  vportOrgX;        /* Viewport origin */
-  INT  vportOrgY;
-  INT  vportExtX;        /* Viewport extent */
-  INT  vportExtY;
 
   CLIPOBJ *CombinedClip;
 

Modified: trunk/reactos/subsystems/win32/win32k/include/gdifloat.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/include/gdifloat.h?rev=28184&r1=28183&r2=28184&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/gdifloat.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/gdifloat.h Mon Aug  6 09:13:47 2007
@@ -80,24 +80,24 @@
 
 #define MulDiv( x, y, z ) EngMulDiv( x, y, z )
 
-#define XDPTOLP(dc,x) \
-    (MulDiv(((x)-(dc)->vportOrgX), (dc)->wndExtX, (dc)->vportExtX) + (dc)->wndOrgX)
-#define YDPTOLP(dc,y) \
-    (MulDiv(((y)-(dc)->vportOrgY), (dc)->wndExtY, (dc)->vportExtY) + (dc)->wndOrgY)
-#define XLPTODP(dc,x) \
-    (MulDiv(((x)-(dc)->wndOrgX), (dc)->vportExtX, (dc)->wndExtX) + (dc)->vportOrgX)
-#define YLPTODP(dc,y) \
-    (MulDiv(((y)-(dc)->wndOrgY), (dc)->vportExtY, (dc)->wndExtY) + (dc)->vportOrgY)
+#define XDPTOLP(dc,tx) \
+    (MulDiv(((tx)-(dc)->Dc_Attr.ptlViewportOrg.x), (dc)->Dc_Attr.szlWindowExt.cx, (dc)->Dc_Attr.szlViewportExt.cx) + (dc)->Dc_Attr.ptlWindowOrg.x)
+#define YDPTOLP(dc,ty) \
+    (MulDiv(((ty)-(dc)->Dc_Attr.ptlViewportOrg.y), (dc)->Dc_Attr.szlWindowExt.cy, (dc)->Dc_Attr.szlViewportExt.cy) + (dc)->Dc_Attr.ptlWindowOrg.y)
+#define XLPTODP(dc,tx) \
+    (MulDiv(((tx)-(dc)->Dc_Attr.ptlWindowOrg.x), (dc)->Dc_Attr.szlViewportExt.cx, (dc)->Dc_Attr.szlWindowExt.cx) + (dc)->Dc_Attr.ptlViewportOrg.x)
+#define YLPTODP(dc,ty) \
+    (MulDiv(((ty)-(dc)->Dc_Attr.ptlWindowOrg.y), (dc)->Dc_Attr.szlViewportExt.cy, (dc)->Dc_Attr.szlWindowExt.cy) + (dc)->Dc_Attr.ptlViewportOrg.y)
 
   /* Device <-> logical size conversion */
 
-#define XDSTOLS(dc,x) \
-    MulDiv((x), (dc)->wndExtX, (dc)->vportExtX)
-#define YDSTOLS(dc,y) \
-    MulDiv((y), (dc)->wndExtY, (dc)->vportExtY)
-#define XLSTODS(dc,x) \
-    MulDiv((x), (dc)->vportExtX, (dc)->wndExtX)
-#define YLSTODS(dc,y) \
-    MulDiv((y), (dc)->vportExtY, (dc)->wndExtY)
+#define XDSTOLS(dc,tx) \
+    MulDiv((tx), (dc)->Dc_Attr.szlWindowExt.cx, (dc)->Dc_Attr.szlViewportExt.cx)
+#define YDSTOLS(dc,ty) \
+    MulDiv((ty), (dc)->Dc_Attr.szlWindowExt.cy, (dc)->Dc_Attr.szlViewportExt.cy)
+#define XLSTODS(dc,tx) \
+    MulDiv((tx), (dc)->Dc_Attr.szlViewportExt.cx, (dc)->Dc_Attr.szlWindowExt.cx)
+#define YLSTODS(dc,ty) \
+    MulDiv((ty), (dc)->Dc_Attr.szlViewportExt.cy, (dc)->Dc_Attr.szlWindowExt.cy)
 
 #endif

Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/coord.c?rev=28184&r1=28183&r2=28184&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/coord.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/coord.c Mon Aug  6 09:13:47 2007
@@ -37,18 +37,18 @@
 void FASTCALL
 IntFixIsotropicMapping(PDC dc)
 {
-  ULONG xdim = EngMulDiv(dc->vportExtX, dc->GDIInfo->ulHorzSize, dc->GDIInfo->ulHorzRes) / dc->wndExtX;
-  ULONG ydim = EngMulDiv(dc->vportExtY, dc->GDIInfo->ulVertSize, dc->GDIInfo->ulVertRes) / dc->wndExtY;
+  ULONG xdim = EngMulDiv(dc->Dc_Attr.szlViewportExt.cx, dc->GDIInfo->ulHorzSize, dc->GDIInfo->ulHorzRes) / dc->Dc_Attr.szlWindowExt.cx;
+  ULONG ydim = EngMulDiv(dc->Dc_Attr.szlViewportExt.cy, dc->GDIInfo->ulVertSize, dc->GDIInfo->ulVertRes) / dc->Dc_Attr.szlWindowExt.cy;
 
   if (xdim > ydim)
   {
-    dc->vportExtX = dc->vportExtX * abs(ydim / xdim);
-    if (!dc->vportExtX) dc->vportExtX = 1;
+    dc->Dc_Attr.szlViewportExt.cx = dc->Dc_Attr.szlViewportExt.cx * abs(ydim / xdim);
+    if (!dc->Dc_Attr.szlViewportExt.cx) dc->Dc_Attr.szlViewportExt.cx = 1;
   }
   else
   {
-    dc->vportExtY = dc->vportExtY * abs(xdim / ydim);
-    if (!dc->vportExtY) dc->vportExtY = 1;
+    dc->Dc_Attr.szlViewportExt.cy = dc->Dc_Attr.szlViewportExt.cy * abs(xdim / ydim);
+    if (!dc->Dc_Attr.szlViewportExt.cy) dc->Dc_Attr.szlViewportExt.cy = 1;
   }
 }
 
@@ -550,8 +550,8 @@
             ProbeForWrite(UnsafePoint,
                           sizeof(POINT),
                           1);
-            UnsafePoint->x = dc->vportOrgX;
-            UnsafePoint->y = dc->vportOrgY;
+            UnsafePoint->x = dc->Dc_Attr.ptlViewportOrg.x;
+            UnsafePoint->y = dc->Dc_Attr.ptlViewportOrg.y;
         }
         _SEH_HANDLE
         {
@@ -567,8 +567,8 @@
 	  }
     }
 
-  dc->vportOrgX += XOffset;
-  dc->vportOrgY += YOffset;
+  dc->Dc_Attr.ptlViewportOrg.x += XOffset;
+  dc->Dc_Attr.ptlViewportOrg.y += YOffset;
   DC_UpdateXforms(dc);
 
   DC_UnlockDc(dc);
@@ -600,8 +600,8 @@
          ProbeForWrite(Point,
                        sizeof(POINT),
                        1);
-         Point->x = dc->wndOrgX;
-         Point->y = dc->wndOrgY;
+         Point->x = dc->Dc_Attr.ptlWindowOrg.x;
+         Point->y = dc->Dc_Attr.ptlWindowOrg.y;
       }
       _SEH_HANDLE
       {
@@ -617,8 +617,8 @@
       }
     }
 
-  dc->wndOrgX += XOffset;
-  dc->wndOrgY += YOffset;
+  dc->Dc_Attr.ptlWindowOrg.x += XOffset;
+  dc->Dc_Attr.ptlWindowOrg.y += YOffset;
 
   DC_UpdateXforms(dc);
   DC_UnlockDc(dc);
@@ -710,46 +710,46 @@
     switch (MapMode)
     {
       case MM_TEXT:
-        dc->wndExtX = 1;
-        dc->wndExtY = 1;
-        dc->vportExtX = 1;
-        dc->vportExtY = 1;
+        dc->Dc_Attr.szlWindowExt.cx = 1;
+        dc->Dc_Attr.szlWindowExt.cy = 1;
+        dc->Dc_Attr.szlViewportExt.cx = 1;
+        dc->Dc_Attr.szlViewportExt.cy = 1;
         break;
 
       case MM_LOMETRIC:
       case MM_ISOTROPIC:
-        dc->wndExtX = dc->GDIInfo->ulHorzSize * 10;
-        dc->wndExtY = dc->GDIInfo->ulVertSize * 10;
-        dc->vportExtX = dc->GDIInfo->ulHorzRes;
-        dc->vportExtY = -dc->GDIInfo->ulVertRes;
+        dc->Dc_Attr.szlWindowExt.cx = dc->GDIInfo->ulHorzSize * 10;
+        dc->Dc_Attr.szlWindowExt.cy = dc->GDIInfo->ulVertSize * 10;
+        dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes;
+        dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes;
         break;
 
       case MM_HIMETRIC:
-        dc->wndExtX = dc->GDIInfo->ulHorzSize * 100;
-        dc->wndExtY = dc->GDIInfo->ulVertSize * 100;
-        dc->vportExtX = dc->GDIInfo->ulHorzRes;
-        dc->vportExtY = -dc->GDIInfo->ulVertRes;
+        dc->Dc_Attr.szlWindowExt.cx = dc->GDIInfo->ulHorzSize * 100;
+        dc->Dc_Attr.szlWindowExt.cy = dc->GDIInfo->ulVertSize * 100;
+        dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes;
+        dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes;
         break;
 
       case MM_LOENGLISH:
-        dc->wndExtX = EngMulDiv(1000, dc->GDIInfo->ulHorzSize, 254);
-        dc->wndExtY = EngMulDiv(1000, dc->GDIInfo->ulVertSize, 254);
-        dc->vportExtX = dc->GDIInfo->ulHorzRes;
-        dc->vportExtY = -dc->GDIInfo->ulVertRes;
+        dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(1000, dc->GDIInfo->ulHorzSize, 254);
+        dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(1000, dc->GDIInfo->ulVertSize, 254);
+        dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes;
+        dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes;
         break;
 
       case MM_HIENGLISH:
-        dc->wndExtX = EngMulDiv(10000, dc->GDIInfo->ulHorzSize, 254);
-        dc->wndExtY = EngMulDiv(10000, dc->GDIInfo->ulVertSize, 254);
-        dc->vportExtX = dc->GDIInfo->ulHorzRes;
-        dc->vportExtY = -dc->GDIInfo->ulVertRes;
+        dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(10000, dc->GDIInfo->ulHorzSize, 254);
+        dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(10000, dc->GDIInfo->ulVertSize, 254);
+        dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes;
+        dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes;
         break;
 
       case MM_TWIPS:
-        dc->wndExtX = EngMulDiv(14400, dc->GDIInfo->ulHorzSize, 254);
-        dc->wndExtY = EngMulDiv(14400, dc->GDIInfo->ulVertSize, 254);
-        dc->vportExtX = dc->GDIInfo->ulHorzRes;
-        dc->vportExtY = -dc->GDIInfo->ulVertRes;
+        dc->Dc_Attr.szlWindowExt.cx = EngMulDiv(14400, dc->GDIInfo->ulHorzSize, 254);
+        dc->Dc_Attr.szlWindowExt.cy = EngMulDiv(14400, dc->GDIInfo->ulVertSize, 254);
+        dc->Dc_Attr.szlViewportExt.cx = dc->GDIInfo->ulHorzRes;
+        dc->Dc_Attr.szlViewportExt.cy = -dc->GDIInfo->ulVertRes;
         break;
 
       case MM_ANISOTROPIC:
@@ -806,11 +806,11 @@
          ProbeForWrite(Size,
                        sizeof(SIZE),
                        1);
-         Size->cx = dc->vportExtX;
-         Size->cy = dc->vportExtY;
-
-		 dc->vportExtX = XExtent;
-         dc->vportExtY = YExtent;
+         Size->cx = dc->Dc_Attr.szlViewportExt.cx;
+         Size->cy = dc->Dc_Attr.szlViewportExt.cy;
+
+		 dc->Dc_Attr.szlViewportExt.cx = XExtent;
+         dc->Dc_Attr.szlViewportExt.cy = YExtent;
 
          if (dc->Dc_Attr.iMapMode == MM_ISOTROPIC)
              IntFixIsotropicMapping(dc);
@@ -861,8 +861,8 @@
          ProbeForWrite(Point,
                        sizeof(POINT),
                        1);
-         Point->x = dc->vportOrgX;
-         Point->y = dc->vportOrgY;
+         Point->x = dc->Dc_Attr.ptlViewportOrg.x;
+         Point->y = dc->Dc_Attr.ptlViewportOrg.y;
       }
       _SEH_HANDLE
       {
@@ -878,8 +878,8 @@
       }
     }
 
-  dc->vportOrgX = X;
-  dc->vportOrgY = Y;
+  dc->Dc_Attr.ptlViewportOrg.x = X;
+  dc->Dc_Attr.ptlViewportOrg.y = Y;
 
   DC_UpdateXforms(dc);
   DC_UnlockDc(dc);
@@ -924,8 +924,8 @@
          ProbeForWrite(Size,
                        sizeof(SIZE),
                        1);
-         Size->cx = dc->wndExtX;
-         Size->cy = dc->wndExtY;
+         Size->cx = dc->Dc_Attr.szlWindowExt.cx;
+         Size->cy = dc->Dc_Attr.szlWindowExt.cy;
       }
       _SEH_HANDLE
       {
@@ -941,8 +941,8 @@
       }
     }
 
-  dc->wndExtX = XExtent;
-  dc->wndExtY = YExtent;
+  dc->Dc_Attr.szlWindowExt.cx = XExtent;
+  dc->Dc_Attr.szlWindowExt.cy = YExtent;
 
   DC_UpdateXforms(dc);
   DC_UnlockDc(dc);
@@ -975,8 +975,8 @@
          ProbeForWrite(Point,
                        sizeof(POINT),
                        1);
-         Point->x = dc->wndOrgX;
-         Point->y = dc->wndOrgY;
+         Point->x = dc->Dc_Attr.ptlWindowOrg.x;
+         Point->y = dc->Dc_Attr.ptlWindowOrg.y;
       }
       _SEH_HANDLE
       {
@@ -992,8 +992,8 @@
       }
     }
 
-  dc->wndOrgX = X;
-  dc->wndOrgY = Y;
+  dc->Dc_Attr.ptlWindowOrg.x = X;
+  dc->Dc_Attr.ptlWindowOrg.y = Y;
 
   DC_UpdateXforms(dc);
   DC_UnlockDc(dc);

Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/dc.c?rev=28184&r1=28183&r2=28184&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Mon Aug  6 09:13:47 2007
@@ -216,14 +216,14 @@
 
   /* DriverName is copied in the AllocDC routine  */
   NewDC->DeviceDriver = OrigDC->DeviceDriver;
-  NewDC->wndOrgX = OrigDC->wndOrgX;
-  NewDC->wndOrgY = OrigDC->wndOrgY;
-  NewDC->wndExtX = OrigDC->wndExtX;
-  NewDC->wndExtY = OrigDC->wndExtY;
-  NewDC->vportOrgX = OrigDC->vportOrgX;
-  NewDC->vportOrgY = OrigDC->vportOrgY;
-  NewDC->vportExtX = OrigDC->vportExtX;
-  NewDC->vportExtY = OrigDC->vportExtY;
+  NewDC->Dc_Attr.ptlWindowOrg.x = OrigDC->Dc_Attr.ptlWindowOrg.x;
+  NewDC->Dc_Attr.ptlWindowOrg.y = OrigDC->Dc_Attr.ptlWindowOrg.y;
+  NewDC->Dc_Attr.szlWindowExt.cx = OrigDC->Dc_Attr.szlWindowExt.cx;
+  NewDC->Dc_Attr.szlWindowExt.cy = OrigDC->Dc_Attr.szlWindowExt.cy;
+  NewDC->Dc_Attr.ptlViewportOrg.x = OrigDC->Dc_Attr.ptlViewportOrg.x;
+  NewDC->Dc_Attr.ptlViewportOrg.y = OrigDC->Dc_Attr.ptlViewportOrg.y;
+  NewDC->Dc_Attr.szlViewportExt.cx = OrigDC->Dc_Attr.szlViewportExt.cx;
+  NewDC->Dc_Attr.szlViewportExt.cy = OrigDC->Dc_Attr.szlViewportExt.cy;
 
   /* Create default bitmap */
   if (!(hBitmap = NtGdiCreateBitmap( 1, 1, 1, NewDC->w.bitsPerPixel, NULL )))
@@ -1294,14 +1294,14 @@
   newdc->w.xformWorld2Vport = dc->w.xformWorld2Vport;
   newdc->w.xformVport2World = dc->w.xformVport2World;
   newdc->w.vport2WorldValid = dc->w.vport2WorldValid;
-  newdc->wndOrgX            = dc->wndOrgX;
-  newdc->wndOrgY            = dc->wndOrgY;
-  newdc->wndExtX            = dc->wndExtX;
-  newdc->wndExtY            = dc->wndExtY;
-  newdc->vportOrgX          = dc->vportOrgX;
-  newdc->vportOrgY          = dc->vportOrgY;
-  newdc->vportExtX          = dc->vportExtX;
-  newdc->vportExtY          = dc->vportExtY;
+  newdc->Dc_Attr.ptlWindowOrg.x            = dc->Dc_Attr.ptlWindowOrg.x;
+  newdc->Dc_Attr.ptlWindowOrg.y            = dc->Dc_Attr.ptlWindowOrg.y;
+  newdc->Dc_Attr.szlWindowExt.cx            = dc->Dc_Attr.szlWindowExt.cx;
+  newdc->Dc_Attr.szlWindowExt.cy            = dc->Dc_Attr.szlWindowExt.cy;
+  newdc->Dc_Attr.ptlViewportOrg.x          = dc->Dc_Attr.ptlViewportOrg.x;
+  newdc->Dc_Attr.ptlViewportOrg.y          = dc->Dc_Attr.ptlViewportOrg.y;
+  newdc->Dc_Attr.szlViewportExt.cx          = dc->Dc_Attr.szlViewportExt.cx;
+  newdc->Dc_Attr.szlViewportExt.cy          = dc->Dc_Attr.szlViewportExt.cy;
 
   newdc->hSelf = hnewdc;
   newdc->saveLevel = 0;
@@ -1379,14 +1379,14 @@
         dc->w.xformVport2World = dcs->w.xformVport2World;
         dc->w.vport2WorldValid = dcs->w.vport2WorldValid;
 
-        dc->wndOrgX            = dcs->wndOrgX;
-        dc->wndOrgY            = dcs->wndOrgY;
-        dc->wndExtX            = dcs->wndExtX;
-        dc->wndExtY            = dcs->wndExtY;
-        dc->vportOrgX          = dcs->vportOrgX;
-        dc->vportOrgY          = dcs->vportOrgY;
-        dc->vportExtX          = dcs->vportExtX;
-        dc->vportExtY          = dcs->vportExtY;
+        dc->Dc_Attr.ptlWindowOrg.x            = dcs->Dc_Attr.ptlWindowOrg.x;
+        dc->Dc_Attr.ptlWindowOrg.y            = dcs->Dc_Attr.ptlWindowOrg.y;
+        dc->Dc_Attr.szlWindowExt.cx            = dcs->Dc_Attr.szlWindowExt.cx;
+        dc->Dc_Attr.szlWindowExt.cy            = dcs->Dc_Attr.szlWindowExt.cy;
+        dc->Dc_Attr.ptlViewportOrg.x          = dcs->Dc_Attr.ptlViewportOrg.x;
+        dc->Dc_Attr.ptlViewportOrg.y          = dcs->Dc_Attr.ptlViewportOrg.y;
+        dc->Dc_Attr.szlViewportExt.cx          = dcs->Dc_Attr.szlViewportExt.cx;
+        dc->Dc_Attr.szlViewportExt.cy          = dcs->Dc_Attr.szlViewportExt.cy;
         dc->PalIndexed         = dcs->PalIndexed;
 
         if (!(dc->w.flags & DC_MEMORY))
@@ -1778,10 +1778,10 @@
 DC_GET_VAL( INT, NtGdiGetStretchBltMode, Dc_Attr.jStretchBltMode )
 DC_GET_VAL( UINT, NtGdiGetTextAlign, Dc_Attr.lTextAlign )
 DC_GET_VAL( COLORREF, NtGdiGetTextColor, Dc_Attr.crForegroundClr )
-DC_GET_VAL_EX( GetViewportExtEx, vportExtX, vportExtY, SIZE, cx, cy )
-DC_GET_VAL_EX( GetViewportOrgEx, vportOrgX, vportOrgY, POINT, x, y )
-DC_GET_VAL_EX( GetWindowExtEx, wndExtX, wndExtY, SIZE, cx, cy )
-DC_GET_VAL_EX( GetWindowOrgEx, wndOrgX, wndOrgY, POINT, x, y )
+DC_GET_VAL_EX( GetViewportExtEx, Dc_Attr.szlViewportExt.cx, Dc_Attr.szlViewportExt.cy, SIZE, cx, cy )
+DC_GET_VAL_EX( GetViewportOrgEx, Dc_Attr.ptlViewportOrg.x, Dc_Attr.ptlViewportOrg.y, POINT, x, y )
+DC_GET_VAL_EX( GetWindowExtEx, Dc_Attr.szlWindowExt.cx, Dc_Attr.szlWindowExt.cy, SIZE, cx, cy )
+DC_GET_VAL_EX( GetWindowOrgEx, Dc_Attr.ptlWindowOrg.x, Dc_Attr.ptlWindowOrg.y, POINT, x, y )
 
 BOOL
 APIENTRY
@@ -2205,10 +2205,12 @@
   NewDC->Dc_Attr.iMapMode = MM_TEXT;
 //  DC_Attr->iMapMode = MM_TEXT;
 
-  NewDC->wndExtX = 1.0f;
-  NewDC->wndExtY = 1.0f;
-  NewDC->vportExtX = 1.0f;
-  NewDC->vportExtY = 1.0f;
+
+//// HELP! FLOAT to INT !!!!!!!!!
+  NewDC->Dc_Attr.szlWindowExt.cx = 1.0f;
+  NewDC->Dc_Attr.szlWindowExt.cy = 1.0f;
+  NewDC->Dc_Attr.szlViewportExt.cx = 1.0f;
+  NewDC->Dc_Attr.szlViewportExt.cy = 1.0f;
 
   NewDC->Dc_Attr.crForegroundClr = 0;
 //  NewDC->pDc_Attr->ulForegroundClr = 0; // Already Zero
@@ -2313,14 +2315,14 @@
   FLOAT  scaleX, scaleY;
 
   /* Construct a transformation to do the window-to-viewport conversion */
-  scaleX = (dc->wndExtX ? (FLOAT)dc->vportExtX / (FLOAT)dc->wndExtX : 0.0f);
-  scaleY = (dc->wndExtY ? (FLOAT)dc->vportExtY / (FLOAT)dc->wndExtY : 0.0f);
+  scaleX = (dc->Dc_Attr.szlWindowExt.cx ? (FLOAT)dc->Dc_Attr.szlViewportExt.cx / (FLOAT)dc->Dc_Attr.szlWindowExt.cx : 0.0f);
+  scaleY = (dc->Dc_Attr.szlWindowExt.cy ? (FLOAT)dc->Dc_Attr.szlViewportExt.cy / (FLOAT)dc->Dc_Attr.szlWindowExt.cy : 0.0f);
   xformWnd2Vport.eM11 = scaleX;
   xformWnd2Vport.eM12 = 0.0;
   xformWnd2Vport.eM21 = 0.0;
   xformWnd2Vport.eM22 = scaleY;
-  xformWnd2Vport.eDx  = (FLOAT)dc->vportOrgX - scaleX * (FLOAT)dc->wndOrgX;
-  xformWnd2Vport.eDy  = (FLOAT)dc->vportOrgY - scaleY * (FLOAT)dc->wndOrgY;
+  xformWnd2Vport.eDx  = (FLOAT)dc->Dc_Attr.ptlViewportOrg.x - scaleX * (FLOAT)dc->Dc_Attr.ptlWindowOrg.x;
+  xformWnd2Vport.eDy  = (FLOAT)dc->Dc_Attr.ptlViewportOrg.y - scaleY * (FLOAT)dc->Dc_Attr.ptlWindowOrg.y;
 
   /* Combine with the world transformation */
   IntGdiCombineTransform(&dc->w.xformWorld2Vport, &dc->w.xformWorld2Wnd, &xformWnd2Vport);

Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/path.c?rev=28184&r1=28183&r2=28184&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/path.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/path.c Mon Aug  6 09:13:47 2007
@@ -1487,10 +1487,10 @@
 
     /* Set MM_TEXT */
     dc->Dc_Attr.iMapMode = MM_TEXT;
-    dc->vportOrgX = 0;
-    dc->vportOrgY = 0;
-    dc->wndOrgX = 0;
-    dc->wndOrgY = 0;
+    dc->Dc_Attr.ptlViewportOrg.x = 0;
+    dc->Dc_Attr.ptlViewportOrg.y = 0;
+    dc->Dc_Attr.ptlWindowOrg.x = 0;
+    dc->Dc_Attr.ptlWindowOrg.y = 0;
     graphicsMode = dc->Dc_Attr.iGraphicsMode;
     dc->Dc_Attr.iGraphicsMode = GM_ADVANCED;
     IntGdiModifyWorldTransform(dc, &xform, MWT_IDENTITY);
@@ -1600,15 +1600,15 @@
 
     /* Restore the old mapping mode */
     dc->Dc_Attr.iMapMode =  mapMode;
-    dc->wndExtX = szWindowExt.cx;
-    dc->wndExtY = szWindowExt.cy;
-    dc->wndOrgX = ptWindowOrg.x;
-    dc->wndOrgY = ptWindowOrg.y;
+    dc->Dc_Attr.szlWindowExt.cx = szWindowExt.cx;
+    dc->Dc_Attr.szlWindowExt.cy = szWindowExt.cy;
+    dc->Dc_Attr.ptlWindowOrg.x = ptWindowOrg.x;
+    dc->Dc_Attr.ptlWindowOrg.y = ptWindowOrg.y;
     
-    dc->vportExtX = szViewportExt.cx;
-    dc->vportExtY = szViewportExt.cy;
-    dc->vportOrgX = ptViewportOrg.x;
-    dc->vportOrgY = ptViewportOrg.y;
+    dc->Dc_Attr.szlViewportExt.cx = szViewportExt.cx;
+    dc->Dc_Attr.szlViewportExt.cx = szViewportExt.cy;
+    dc->Dc_Attr.ptlViewportOrg.x = ptViewportOrg.x;
+    dc->Dc_Attr.ptlViewportOrg.y = ptViewportOrg.y;
 
     /* Restore the world transform */
     dc->w.xformWorld2Wnd = xform;

Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/region.c?rev=28184&r1=28183&r2=28184&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/region.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/region.c Mon Aug  6 09:13:47 2007
@@ -1860,7 +1860,8 @@
     if(NtGdiCombineRgn(hDest, hSrc, 0, RGN_COPY) == ERROR)
       goto done;
 
-    NtGdiOffsetRgn(hDest, dc->vportOrgX - dc->wndOrgX, dc->vportOrgY - dc->wndOrgY);
+    NtGdiOffsetRgn(hDest, dc->Dc_Attr.ptlViewportOrg.x - dc->Dc_Attr.ptlWindowOrg.x,
+                                       dc->Dc_Attr.ptlViewportOrg.y - dc->Dc_Attr.ptlWindowOrg.y);
     ret = TRUE;
     goto done;
   }




More information about the Ros-diffs mailing list