Make sure rectangle is not inverted in Rectangle function

Fixes gdi32:Rectangle apitest

svn path=/trunk/; revision=51109
This commit is contained in:
Rafal Harabien 2011-03-21 14:47:06 +00:00
parent ec3c8d2441
commit 347b8aee6f

View file

@ -545,10 +545,11 @@ IntRectangle(PDC dc,
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);