Author: rharabien Date: Mon Mar 21 14:47:06 2011 New Revision: 51109
URL: http://svn.reactos.org/svn/reactos?rev=51109&view=rev Log: Make sure rectangle is not inverted in Rectangle function Fixes gdi32:Rectangle apitest
Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] Mon Mar 21 14:47:06 2011 @@ -545,10 +545,11 @@ return PATH_Rectangle ( dc, LeftRect, TopRect, RightRect, BottomRect ); }
- DestRect.left = LeftRect; - DestRect.right = RightRect; - DestRect.top = TopRect; - DestRect.bottom = BottomRect; + /* Make sure rectangle is not inverted */ + DestRect.left = min(LeftRect, RightRect); + DestRect.right = max(LeftRect, RightRect); + DestRect.top = min(TopRect, BottomRect); + DestRect.bottom = max(TopRect, BottomRect);
IntLPtoDP(dc, (LPPOINT)&DestRect, 2);