[ros-diffs] [jimtabor] 34198: Add and fix path calls. This allows more drawing tests (Area.exe by Yian)to pass based on observation.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Mon Jun 30 02:47:59 CEST 2008


Author: jimtabor
Date: Sun Jun 29 19:47:58 2008
New Revision: 34198

URL: http://svn.reactos.org/svn/reactos?rev=34198&view=rev
Log:
Add and fix path calls. This allows more drawing tests (Area.exe by Yian)to pass based on observation.

Modified:
    trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
    trunk/reactos/subsystems/win32/win32k/objects/line.c

Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/fillshap.c?rev=34198&r1=34197&r2=34198&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] Sun Jun 29 19:47:58 2008
@@ -76,10 +76,7 @@
         UnsafePoints[CurrentPoint].x += dc->ptlDCOrig.x;
         UnsafePoints[CurrentPoint].y += dc->ptlDCOrig.y;
     }
-
-    if (PATH_IsPathOpen(dc->DcLevel))
-        ret = PATH_Polygon(dc, UnsafePoints, Count );
-    else
+    // No need to have path here.
     {
         DestRect.left   = UnsafePoints[0].x;
         DestRect.right  = UnsafePoints[0].x;
@@ -157,6 +154,8 @@
                   LPINT   PolyCounts,
                   int     Count)
 {
+    if (PATH_IsPathOpen(dc->DcLevel))
+        return PATH_PolyPolygon ( dc, Points, PolyCounts, Count);
     while (--Count >=0)
     {
         if (!IntGdiPolygon ( dc, Points, *PolyCounts ))
@@ -225,15 +224,6 @@
 
     if ((nLeftRect == nRightRect) || (nTopRect == nBottomRect)) return TRUE;
 
-    if (nRightRect < nLeftRect)
-    {
-       INT tmp = nRightRect; nRightRect = nLeftRect; nLeftRect = tmp;
-    }
-    if (nBottomRect < nTopRect)
-    {
-       INT tmp = nBottomRect; nBottomRect = nTopRect; nTopRect = tmp;
-    }
-
     /*
      * Get pointers to all necessary GDI objects.
      */
@@ -244,11 +234,28 @@
         SetLastWin32Error(ERROR_INVALID_HANDLE);
         return FALSE;
     }
+
     if (dc->DC_Type == DC_TYPE_INFO)
     {
         DC_UnlockDc(dc);
         /* Yes, Windows really returns TRUE in this case */
         return TRUE;
+    }
+
+    if (PATH_IsPathOpen(dc->DcLevel))
+    {
+       ret = PATH_Ellipse(dc, nLeftRect, nTopRect, nRightRect, nBottomRect);
+       DC_UnlockDc(dc);
+       return ret;
+    }
+
+    if (nRightRect < nLeftRect)
+    {
+       INT tmp = nRightRect; nRightRect = nLeftRect; nLeftRect = tmp;
+    }
+    if (nBottomRect < nTopRect)
+    {
+       INT tmp = nBottomRect; nBottomRect = nTopRect; nTopRect = tmp;
     }
 
     Dc_Attr = dc->pDc_Attr;

Modified: trunk/reactos/subsystems/win32/win32k/objects/line.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/line.c?rev=34198&r1=34197&r2=34198&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/line.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/line.c [iso-8859-1] Sun Jun 29 19:47:58 2008
@@ -102,17 +102,15 @@
     if (PATH_IsPathOpen(dc->DcLevel))
     {
         Ret = PATH_LineTo(dc, XEnd, YEnd);
-//#if 0
         if (Ret)
         {
-            // FIXME - PATH_LineTo should maybe do this...
+            // FIXME - PATH_LineTo should maybe do this? No
             Dc_Attr->ptlCurrent.x = XEnd;
             Dc_Attr->ptlCurrent.y = YEnd;
             Dc_Attr->ptfxCurrent = Dc_Attr->ptlCurrent;
             CoordLPtoDP(dc, &Dc_Attr->ptfxCurrent); // Update fx
             Dc_Attr->ulDirty_ &= ~(DIRTY_PTLCURRENT|DIRTY_PTFXCURRENT|DIRTY_STYLESTATE);
         }
-//#endif
         return Ret;
     }
     else
@@ -361,6 +359,9 @@
     BOOL ret = FALSE; // default to failure
     pts = pt;
     pc = PolyPoints;
+
+    if (PATH_IsPathOpen(dc->DcLevel))
+        return PATH_PolyPolyline( dc, pt, PolyPoints, Count );
 
     for (i = 0; i < Count; i++)
     {



More information about the Ros-diffs mailing list