[NtGdi]
authorJames Tabor <james.tabor@reactos.org>
Wed, 7 Sep 2016 03:20:18 +0000 (03:20 +0000)
committerJames Tabor <james.tabor@reactos.org>
Wed, 7 Sep 2016 03:20:18 +0000 (03:20 +0000)
- Remove Path for MoveTo. It is not needed.

svn path=/trunk/; revision=72603

reactos/win32ss/gdi/ntgdi/arc.c
reactos/win32ss/gdi/ntgdi/intgdi.h
reactos/win32ss/gdi/ntgdi/line.c
reactos/win32ss/gdi/ntgdi/path.h

index c24628c..ddbc68b 100644 (file)
@@ -238,9 +238,9 @@ IntGdiArcInternal(
   if (arctype == GdiTypeArcTo)
   {
      if (dc->dclevel.flPath & DCPATH_CLOCKWISE)
-       IntGdiMoveToEx(dc, XStartArc, YStartArc, NULL, TRUE);
+       IntGdiMoveToEx(dc, XStartArc, YStartArc, NULL);
      else
-       IntGdiMoveToEx(dc, XEndArc, YEndArc, NULL, TRUE);
+       IntGdiMoveToEx(dc, XEndArc, YEndArc, NULL);
   }
   return Ret;
 }
@@ -285,7 +285,7 @@ IntGdiAngleArc( PDC pDC,
 
   if (result)
   {
-     IntGdiMoveToEx(pDC, x2, y2, NULL, TRUE);
+     IntGdiMoveToEx(pDC, x2, y2, NULL);
   }
   return result;
 }
index aaeb04e..e6ac7cc 100644 (file)
@@ -25,8 +25,7 @@ BOOL FASTCALL
 IntGdiMoveToEx(DC      *dc,
                int     X,
                int     Y,
-               LPPOINT Point,
-               BOOL    BypassPath);
+               LPPOINT Point);
 
 BOOL FASTCALL
 IntGdiPolyBezier(DC      *dc,
index 02f81aa..63c2740 100644 (file)
@@ -19,10 +19,8 @@ BOOL FASTCALL
 IntGdiMoveToEx(DC      *dc,
                int     X,
                int     Y,
-               LPPOINT Point,
-               BOOL    BypassPath)
+               LPPOINT Point)
 {
-    BOOL  PathIsOpen;
     PDC_ATTR pdcattr = dc->pdcattr;
     if ( Point )
     {
@@ -44,13 +42,6 @@ IntGdiMoveToEx(DC      *dc,
     CoordLPtoDP(dc, &pdcattr->ptfxCurrent); // Update fx
     pdcattr->ulDirty_ &= ~(DIRTY_PTLCURRENT|DIRTY_PTFXCURRENT|DIRTY_STYLESTATE);
 
-    if (BypassPath) return TRUE;
-
-    PathIsOpen = PATH_IsPathOpen(dc->dclevel);
-
-    if ( PathIsOpen )
-        return PATH_MoveTo ( dc );
-
     return TRUE;
 }
 
@@ -67,7 +58,7 @@ GreMoveTo( HDC hdc,
       EngSetLastError(ERROR_INVALID_HANDLE);
       return FALSE;
    }
-   Ret = IntGdiMoveToEx(dc, x, y, pptOut, TRUE);
+   Ret = IntGdiMoveToEx(dc, x, y, pptOut);
    DC_UnlockDc(dc);
    return Ret;
 }
@@ -108,16 +99,6 @@ IntGdiLineTo(DC  *dc,
     if (PATH_IsPathOpen(dc->dclevel))
     {
         Ret = PATH_LineTo(dc, XEnd, YEnd);
-        if (Ret)
-        {
-            // FIXME: PATH_LineTo should maybe do this? No
-            pdcattr->ptlCurrent.x = XEnd;
-            pdcattr->ptlCurrent.y = YEnd;
-            pdcattr->ptfxCurrent = pdcattr->ptlCurrent;
-            CoordLPtoDP(dc, &pdcattr->ptfxCurrent); // Update fx
-            pdcattr->ulDirty_ &= ~(DIRTY_PTLCURRENT|DIRTY_PTFXCURRENT|DIRTY_STYLESTATE);
-        }
-        return Ret;
     }
     else
     {
@@ -257,9 +238,6 @@ IntGdiPolyline(DC      *dc,
         return FALSE;
     }
 
-    if (PATH_IsPathOpen(dc->dclevel))
-        return PATH_Polyline(dc, pt, Count);
-
     DC_vPrepareDCsForBlit(dc, NULL, NULL, NULL);
     psurf = dc->dclevel.pSurface;
 
@@ -355,8 +333,9 @@ IntGdiPolyPolyline(DC      *dc,
     pc = PolyPoints;
 
     if (PATH_IsPathOpen(dc->dclevel))
+    {
         return PATH_PolyPolyline( dc, pt, PolyPoints, Count );
-
+    }
     for (i = 0; i < Count; i++)
     {
         ret = IntGdiPolyline ( dc, pts, *pc );
@@ -544,7 +523,7 @@ NtGdiPolyDraw(
         }
 
         if (num_pts >= 2) IntGdiPolyline( dc, line_pts, num_pts );
-        IntGdiMoveToEx( dc, line_pts[num_pts - 1].x, line_pts[num_pts - 1].y, NULL, TRUE );
+        IntGdiMoveToEx( dc, line_pts[num_pts - 1].x, line_pts[num_pts - 1].y, NULL );
         result = TRUE;
     }
     _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
@@ -592,7 +571,7 @@ NtGdiMoveTo(
     pdc = DC_LockDc(hdc);
     if (!pdc) return FALSE;
 
-    Ret = IntGdiMoveToEx(pdc, x, y, &Point, TRUE);
+    Ret = IntGdiMoveToEx(pdc, x, y, &Point);
 
     if (Ret && pptOut)
     {
index 853d0f5..9b03e65 100644 (file)
@@ -54,7 +54,6 @@ BOOL FASTCALL PATH_Arc (PDC dc, INT x1, INT y1, INT x2, INT y2, INT xStart, INT
 BOOL FASTCALL PATH_Ellipse (PDC dc, INT x1, INT y1, INT x2, INT y2);
 VOID FASTCALL PATH_EmptyPath (PPATH pPath);
 BOOL FASTCALL PATH_LineTo (PDC dc, INT x, INT y);
-BOOL FASTCALL PATH_MoveTo (PDC dc);
 BOOL FASTCALL PATH_PolyBezier (PDC dc, const POINT *pts, DWORD cbPoints);
 BOOL FASTCALL PATH_PolyBezierTo (PDC dc, const POINT *pts, DWORD cbPoints);
 BOOL FASTCALL PATH_PolyDraw(PDC dc, const POINT *pts, const BYTE *types, DWORD cbPoints);