diff --git a/dlls/gdi32/objects.c b/dlls/gdi32/objects.c index e614a9d6a52..84ed2377954 100644 --- a/dlls/gdi32/objects.c +++ b/dlls/gdi32/objects.c @@ -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.@) * diff --git a/dlls/gdi32/painting.c b/dlls/gdi32/painting.c index f9fa18c4de0..803b9797736 100644 --- a/dlls/gdi32/painting.c +++ b/dlls/gdi32/painting.c @@ -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 ); diff --git a/dlls/gdi32/region.c b/dlls/gdi32/region.c index 502ce108a8f..4df48209de5 100644 --- a/dlls/gdi32/region.c +++ b/dlls/gdi32/region.c @@ -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 ); -}