[try 5][Gdiplus 4/6] Implement GdipSetInfinite
Adam Petaccia
adam at tpetaccia.com
Thu Jul 24 18:01:41 CDT 2008
Changelog:
(try4):
Update for new naming scheme
region->node is no longer a pointer
(try2):
Don't delete the region, just its element and call InitRegion.
---
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 900d470..501e81e 100644
--- a/dlls/gdiplus/region.c
+++ b/dlls/gdiplus/region.c
@@ -319,12 +319,17 @@ GpStatus WINGDIPAPI GdipSetEmpty(GpRegion *region)
GpStatus WINGDIPAPI GdipSetInfinite(GpRegion *region)
{
- static int calls;
+ GpStatus stat;
- if(!(calls++))
- FIXME("not implemented\n");
+ if (!region)
+ return InvalidParameter;
- return NotImplemented;
+ TRACE("%p", region);
+
+ delete_element(®ion->node);
+ stat = init_region(region, RegionDataInfiniteRect);
+
+ return stat;
}
GpStatus WINGDIPAPI GdipTransformRegion(GpRegion *region, GpMatrix *matrix)
diff --git a/dlls/gdiplus/tests/region.c b/dlls/gdiplus/tests/region.c
index 41359d8..554dab9 100644
--- a/dlls/gdiplus/tests/region.c
+++ b/dlls/gdiplus/tests/region.c
@@ -97,10 +97,13 @@ todo_wine
expect_magic((DWORD*)(buf + 2));
expect_dword(buf + 3, 0);
expect_dword(buf + 4, RGNDATA_EMPTY_RECT);
+}
status = GdipSetInfinite(region);
ok(status == Ok, "status %08x\n", status);
status = GdipGetRegionDataSize(region, &needed);
+todo_wine
+{
ok(status == Ok, "status %08x\n", status);
expect(20, needed);
status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed);
--
1.5.4.3
More information about the wine-patches
mailing list