Add RECTL_vMakeWellOrdered
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 13 Apr 2009 21:38:37 +0000 (21:38 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 13 Apr 2009 21:38:37 +0000 (21:38 +0000)
svn path=/trunk/; revision=40492

reactos/subsystems/win32/win32k/include/rect.h
reactos/subsystems/win32/win32k/objects/rect.c

index b189b76..a068724 100644 (file)
@@ -54,7 +54,9 @@ BOOL
 FASTCALL
 RECTL_bIntersectRect(RECTL *prclDst, const RECTL *prcl1, const RECTL *prcl2);
 
-
+VOID
+FASTCALL
+RECTL_vMakeWellOrdered(RECTL *prcl);
 
 
 #endif /* _WIN32K_RECT_H */
index 35ad5f6..693377c 100644 (file)
@@ -83,6 +83,24 @@ RECTL_bIntersectRect(RECTL* prclDst, const RECTL* prcl1, const RECTL* prcl2)
     return FALSE;
 }
 
+VOID
+FASTCALL
+RECTL_vMakeWellOrdered(RECTL *prcl)
+{
+    LONG lTmp;
+    if (prcl->left > prcl->right)
+    {
+        lTmp = prcl->left;
+        prcl->left = prcl->right;
+        prcl->right = lTmp;       
+    }
+    if (prcl->top > prcl->bottom)
+    {
+        lTmp = prcl->top;
+        prcl->top = prcl->bottom;
+        prcl->bottom = lTmp;       
+    }
+}
 
 
 /* EOF */