From dd1f9a39cffbfd70132a7d403187378f2178559b Mon Sep 17 00:00:00 2001 From: Adam Petaccia Date: Thu, 24 Jul 2008 19:01:37 -0400 Subject: [PATCH] gdiplus: Implement GdipSetEmpty. --- dlls/gdiplus/region.c | 13 +++++++++---- dlls/gdiplus/tests/region.c | 3 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/gdiplus/region.c b/dlls/gdiplus/region.c index 0e965508aa7..900d47051c4 100644 --- a/dlls/gdiplus/region.c +++ b/dlls/gdiplus/region.c @@ -304,12 +304,17 @@ GpStatus WINGDIPAPI GdipIsInfiniteRegion(GpRegion *region, GpGraphics *graphics, GpStatus WINGDIPAPI GdipSetEmpty(GpRegion *region) { - static int calls; + GpStatus stat; - if(!(calls++)) - FIXME("not implemented\n"); + TRACE("%p\n", region); - return NotImplemented; + if (!region) + return InvalidParameter; + + delete_element(®ion->node); + stat = init_region(region, RegionDataEmptyRect); + + return stat; } GpStatus WINGDIPAPI GdipSetInfinite(GpRegion *region) diff --git a/dlls/gdiplus/tests/region.c b/dlls/gdiplus/tests/region.c index a5064d1ac15..41359d8c590 100644 --- a/dlls/gdiplus/tests/region.c +++ b/dlls/gdiplus/tests/region.c @@ -82,7 +82,10 @@ todo_wine expect_dword(buf + 4, RGNDATA_INFINITE_RECT); status = GdipSetEmpty(region); +} ok(status == Ok, "status %08x\n", status); +todo_wine +{ status = GdipGetRegionDataSize(region, &needed); ok(status == Ok, "status %08x\n", status); expect(20, needed);