mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 15:13:05 +00:00
Make sure rectangle is not inverted in Rectangle function
Fixes gdi32:Rectangle apitest svn path=/trunk/; revision=51109
This commit is contained in:
parent
ec3c8d2441
commit
347b8aee6f
1 changed files with 5 additions and 4 deletions
|
@ -545,10 +545,11 @@ IntRectangle(PDC dc,
|
||||||
return PATH_Rectangle ( dc, LeftRect, TopRect, RightRect, BottomRect );
|
return PATH_Rectangle ( dc, LeftRect, TopRect, RightRect, BottomRect );
|
||||||
}
|
}
|
||||||
|
|
||||||
DestRect.left = LeftRect;
|
/* Make sure rectangle is not inverted */
|
||||||
DestRect.right = RightRect;
|
DestRect.left = min(LeftRect, RightRect);
|
||||||
DestRect.top = TopRect;
|
DestRect.right = max(LeftRect, RightRect);
|
||||||
DestRect.bottom = BottomRect;
|
DestRect.top = min(TopRect, BottomRect);
|
||||||
|
DestRect.bottom = max(TopRect, BottomRect);
|
||||||
|
|
||||||
IntLPtoDP(dc, (LPPOINT)&DestRect, 2);
|
IntLPtoDP(dc, (LPPOINT)&DestRect, 2);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue