mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Fix inverse sort for rects.
svn path=/trunk/; revision=31601
This commit is contained in:
parent
21fd38fc61
commit
3a4e403d40
1 changed files with 28 additions and 17 deletions
|
@ -6,24 +6,35 @@ VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
SortRects(PRECT pRect, INT nCount)
|
SortRects(PRECT pRect, INT nCount)
|
||||||
{
|
{
|
||||||
INT i = 0, a = 0, b = 0;
|
INT i = 0, a = 0, b = 0, c, s;
|
||||||
RECT sRect;
|
RECT sRect;
|
||||||
|
|
||||||
if (nCount > 0)
|
if (nCount > 0)
|
||||||
{
|
{
|
||||||
for(;;)
|
i = 1; // set index point
|
||||||
{
|
c = nCount; // set inverse count
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if(pRect[b].top != pRect[i].bottom) break;
|
s = i; // set sort count
|
||||||
if(pRect[b].left < pRect[a].left)
|
if ( i < nCount )
|
||||||
{
|
{
|
||||||
sRect = pRect[a];
|
a = i - 1;
|
||||||
pRect[a] = pRect[b];
|
b = i;
|
||||||
pRect[b] = sRect;
|
do
|
||||||
}
|
{
|
||||||
} while(0);
|
if(pRect[b].top != pRect[i].bottom) break;
|
||||||
}
|
if(pRect[b].left < pRect[a].left)
|
||||||
|
{
|
||||||
|
sRect = pRect[a];
|
||||||
|
pRect[a] = pRect[b];
|
||||||
|
pRect[b] = sRect;
|
||||||
|
}
|
||||||
|
++s;
|
||||||
|
++b;
|
||||||
|
} while ( s < nCount );
|
||||||
|
}
|
||||||
|
++i;
|
||||||
|
} while ( c-- != 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,9 +234,9 @@ GetClipRgn(
|
||||||
{
|
{
|
||||||
INT Ret = NtGdiGetRandomRgn(hdc, hrgn, 1);
|
INT Ret = NtGdiGetRandomRgn(hdc, hrgn, 1);
|
||||||
// if (Ret)
|
// if (Ret)
|
||||||
// {
|
// {
|
||||||
// if(GetLayout(hdc) & LAYOUT_RTL) MirrorRgnDC(hdc,(HRGN)Ret, NULL);
|
// if(GetLayout(hdc) & LAYOUT_RTL) MirrorRgnDC(hdc,(HRGN)Ret, NULL);
|
||||||
// }
|
// }
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue