gdi32: Use NtGdiPolyPolyDraw for CreatePolyPolygonRgn implementation.

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:
Jacek Caban 2021-07-23 10:49:00 +02:00 committed by Alexandre Julliard
parent 11f09c2d74
commit 607733af0e
3 changed files with 14 additions and 9 deletions

View File

@ -281,6 +281,16 @@ HRGN WINAPI ExtCreateRegion( const XFORM *xform, DWORD count, const RGNDATA *dat
return NtGdiExtCreateRegion( xform, count, data );
}
/***********************************************************************
* CreatePolyPolygonRgn (GDI32.@)
*/
HRGN WINAPI CreatePolyPolygonRgn( const POINT *points, const INT *counts, INT count, INT mode )
{
ULONG ret = NtGdiPolyPolyDraw( ULongToHandle(mode), points, (const UINT *)counts,
count, NtGdiPolyPolygonRgn );
return ULongToHandle( ret );
}
/***********************************************************************
* CreateRectRgnIndirect (GDI32.@)
*

View File

@ -585,6 +585,10 @@ ULONG WINAPI NtGdiPolyPolyDraw( HDC hdc, const POINT *points, const UINT *counts
ULONG ret;
DC *dc;
if (function == NtGdiPolyPolygonRgn)
return HandleToULong( create_polypolygon_region( points, (const INT *)counts, count,
HandleToULong(hdc), NULL ));
if (!(dc = get_dc_ptr( hdc ))) return FALSE;
update_dc( dc );

View File

@ -2692,12 +2692,3 @@ HRGN create_polypolygon_region( const POINT *Pts, const INT *Count, INT nbpolygo
HeapFree( GetProcessHeap(), 0, pETEs );
return hrgn;
}
/***********************************************************************
* CreatePolyPolygonRgn (GDI32.@)
*/
HRGN WINAPI CreatePolyPolygonRgn( const POINT *pts, const INT *count, INT nbpolygons, INT mode )
{
return create_polypolygon_region( pts, count, nbpolygons, mode, NULL );
}