[ros-diffs] [jimtabor] 32992: Fix copy count and added dc path flags and support new arc direction.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Thu Apr 17 03:12:59 CEST 2008


Author: jimtabor
Date: Wed Apr 16 20:12:58 2008
New Revision: 32992

URL: http://svn.reactos.org/svn/reactos?rev=32992&view=rev
Log:
Fix copy count and added dc path flags and support new arc direction.

Modified:
    trunk/reactos/subsystems/win32/win32k/include/dc.h
    trunk/reactos/subsystems/win32/win32k/objects/dc.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=32992&r1=32991&r2=32992&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Wed Apr 16 20:12:58 2008
@@ -8,6 +8,11 @@
 
 // Get/SetBounds/Rect support.
 #define DCB_WINDOWMGR 0x8000 // Queries the Windows bounding rectangle instead of the application's
+
+  /* DCPATH flPath */
+#define DCPATH_ACTIVE    0x0001
+#define DCPATH_SAVE      0x0002
+#define DCPATH_CLOCKWISE 0x0004
 
   /* DC flags */
 #define DC_SAVED      0x0002   /* It is a saved 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=32992&r1=32991&r2=32992&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Wed Apr 16 20:12:58 2008
@@ -2187,6 +2187,8 @@
   switch (u)
   {
     case GdtGetSetCopyCount:
+      SafeResult = dc->ulCopyCount;
+      dc->ulCopyCount = dwIn;
       break;
     case GdiGetSetTextAlign:
       SafeResult = Dc_Attr->lTextAlign;
@@ -2213,9 +2215,31 @@
       {
          SetLastWin32Error(ERROR_INVALID_PARAMETER);
          Ret = FALSE;
-      }
-      SafeResult = dc->w.ArcDirection;
-      dc->w.ArcDirection = dwIn;
+         break;
+      }
+      if ( Dc_Attr->dwLayout & LAYOUT_RTL )
+      {
+         SafeResult = AD_CLOCKWISE - ((dc->DcLevel.flPath & DCPATH_CLOCKWISE) != 0);
+         if ( dwIn == AD_CLOCKWISE )
+         {
+            dc->DcLevel.flPath |= DCPATH_CLOCKWISE;
+            break;
+         }
+         dc->DcLevel.flPath &= ~DCPATH_CLOCKWISE;
+      }
+      else
+      {
+         SafeResult = ((dc->DcLevel.flPath & DCPATH_CLOCKWISE) != 0) + AD_COUNTERCLOCKWISE;
+         if ( dwIn == AD_COUNTERCLOCKWISE)
+         {
+            dc->DcLevel.flPath |= DCPATH_CLOCKWISE;
+            break;
+         }
+         dc->DcLevel.flPath &= ~DCPATH_CLOCKWISE;
+      }
+
+      SafeResult = dc->w.ArcDirection; // Fixme
+      dc->w.ArcDirection = dwIn;       // Fixme
       break;
     default:
       SetLastWin32Error(ERROR_INVALID_PARAMETER);



More information about the Ros-diffs mailing list