Adam Petaccia : gdiplus: Implement GdipSetEmpty.
Alexandre Julliard
julliard at winehq.org
Fri Jul 25 08:14:04 CDT 2008
Module: wine
Branch: master
Commit: dd1f9a39cffbfd70132a7d403187378f2178559b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=dd1f9a39cffbfd70132a7d403187378f2178559b
Author: Adam Petaccia <adam at tpetaccia.com>
Date: Thu Jul 24 19:01:37 2008 -0400
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 0e96550..900d470 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 a5064d1..41359d8 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);
More information about the wine-cvs
mailing list