gdi32: Mirror the returned rectangle in GetClipBox for RTL layout.
This commit is contained in:
parent
72533173d5
commit
0766d375bc
|
@ -400,6 +400,12 @@ INT WINAPI GetClipBox( HDC hdc, LPRECT rect )
|
||||||
DeleteObject( hrgn );
|
DeleteObject( hrgn );
|
||||||
}
|
}
|
||||||
else ret = GetRgnBox( dc->hVisRgn, rect );
|
else ret = GetRgnBox( dc->hVisRgn, rect );
|
||||||
|
if (dc->layout & LAYOUT_RTL)
|
||||||
|
{
|
||||||
|
int tmp = rect->left;
|
||||||
|
rect->left = rect->right - 1;
|
||||||
|
rect->right = tmp - 1;
|
||||||
|
}
|
||||||
DPtoLP( hdc, (LPPOINT)rect, 2 );
|
DPtoLP( hdc, (LPPOINT)rect, 2 );
|
||||||
release_dc_ptr( dc );
|
release_dc_ptr( dc );
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -311,6 +311,9 @@ static void test_dc_layout(void)
|
||||||
SetRect( &rc, 15, 10, 20, 20 );
|
SetRect( &rc, 15, 10, 20, 20 );
|
||||||
GetClipRgn( hdc, hrgn );
|
GetClipRgn( hdc, hrgn );
|
||||||
GetRgnBox( hrgn, &ret_rc );
|
GetRgnBox( hrgn, &ret_rc );
|
||||||
|
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
||||||
|
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
||||||
|
GetClipBox( hdc, &ret_rc );
|
||||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
||||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
||||||
SetRectRgn( hrgn, 60, 10, 80, 20 );
|
SetRectRgn( hrgn, 60, 10, 80, 20 );
|
||||||
|
@ -320,6 +323,9 @@ static void test_dc_layout(void)
|
||||||
SetRect( &rc, 15, 10, 40, 20 );
|
SetRect( &rc, 15, 10, 40, 20 );
|
||||||
GetClipRgn( hdc, hrgn );
|
GetClipRgn( hdc, hrgn );
|
||||||
GetRgnBox( hrgn, &ret_rc );
|
GetRgnBox( hrgn, &ret_rc );
|
||||||
|
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
||||||
|
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
||||||
|
GetClipBox( hdc, &ret_rc );
|
||||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
||||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue