gdi32: Use NtGdiGetRandomRgn for GetMetaRgn.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8217ce0fef
commit
b096da8a50
|
@ -392,28 +392,6 @@ INT WINAPI NtGdiGetAppClipBox( HDC hdc, RECT *rect )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetMetaRgn (GDI32.@)
|
||||
*/
|
||||
INT WINAPI GetMetaRgn( HDC hdc, HRGN hRgn )
|
||||
{
|
||||
INT ret = 0;
|
||||
DC * dc = get_dc_ptr( hdc );
|
||||
|
||||
if (dc)
|
||||
{
|
||||
if (dc->hMetaRgn && NtGdiCombineRgn( hRgn, dc->hMetaRgn, 0, RGN_COPY ) != ERROR)
|
||||
{
|
||||
ret = 1;
|
||||
if (dc->attr->layout & LAYOUT_RTL)
|
||||
mirror_region( hRgn, hRgn, dc->attr->vis_rect.right - dc->attr->vis_rect.left );
|
||||
}
|
||||
release_dc_ptr( dc );
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* NtGdiGetRandomRgn (win32u.@)
|
||||
*
|
||||
|
@ -442,8 +420,8 @@ INT WINAPI NtGdiGetRandomRgn( HDC hDC, HRGN hRgn, INT iCode )
|
|||
else if (!NtGdiCombineRgn( hRgn, dc->hClipRgn, 0, RGN_COPY )) ret = -1;
|
||||
break;
|
||||
case 2:
|
||||
if (dc->hMetaRgn) NtGdiCombineRgn( hRgn, dc->hMetaRgn, 0, RGN_COPY );
|
||||
else ret = 0;
|
||||
if (!dc->hMetaRgn) ret = 0;
|
||||
else if (!NtGdiCombineRgn( hRgn, dc->hMetaRgn, 0, RGN_COPY )) ret = -1;
|
||||
break;
|
||||
case 3:
|
||||
if (dc->hClipRgn && dc->hMetaRgn) NtGdiCombineRgn( hRgn, dc->hClipRgn, dc->hMetaRgn, RGN_AND );
|
||||
|
|
|
@ -1641,6 +1641,14 @@ INT WINAPI GetClipRgn( HDC hdc, HRGN rgn )
|
|||
return NtGdiGetRandomRgn( hdc, rgn, NTGDI_RGN_MIRROR_RTL | 1 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetMetaRgn (GDI32.@)
|
||||
*/
|
||||
INT WINAPI GetMetaRgn( HDC hdc, HRGN rgn )
|
||||
{
|
||||
return NtGdiGetRandomRgn( hdc, rgn, NTGDI_RGN_MIRROR_RTL | 2 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* IntersectClipRect (GDI32.@)
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue